validatorjs icon indicating copy to clipboard operation
validatorjs copied to clipboard

Support file rule / FileList

Open garygreen opened this issue 6 years ago • 0 comments

This isn't relevant for nodejs but for browser based validation - it would be useful to add a file validation rule.

That way you can validate it's an actual file and also a min/max number of files that can be selected:

<input type="file">
file|min:1|max:15
file|between:1,15

Laravel also has the file validation rule. Again, not applicable to node but it is for the browser. I would find this particularly useful in my side project dominar

garygreen avatar Jun 04 '18 23:06 garygreen