Skip to content

Commit 54b0b0c

Browse files
committed
Update validation.md
1 parent df2bb0d commit 54b0b0c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

validation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,8 @@ If your application accepts images uploaded by your users, you may use the `File
21192119
],
21202120
]);
21212121

2122+
The `File::image()` rule makes sure that the file under validation must be an image (jpg, jpeg, png, bmp, gif, or webp).
2123+
21222124
> [!WARNING]
21232125
> By default the File::image() rule does not allow SVG files due to possible XSS attacks.
21242126
> If you need to allow SVG files, you can pass `allowSvg: true` as argument, e.g. `File::image(allowSvg: true)` and handle potentially unsafe SVG files manually.

0 commit comments

Comments
 (0)