Closed andheiberg closed 10 years ago
If you want to support all file types and all sizes, don't add the validator at all (you don't have to, they're optional modules). If you need to validate only the size, you can very quickly write a new one and add it in. Actually, maybe it would have been better if instead of one Simple
validator I created one DefaultTypeValidator
and one DefaultSizeValidator
, or something along those lines, and illustrated that you can call addValidator
multiple times. I dunno. Let me know what you think.
I created one DefaultTypeValidator and one DefaultSizeValidator, or something along those lines, and illustrated that you can call addValidator multiple times.
I think that's a great idea.
Also I didn't know adding a validator was optional, so my problem was elevated by that.
Great package by the way.
Is there someway to support all file types?
Like
$validator = new \FileUpload\Validator\Simple(1024 * 1024 * 200, '*');