Closed IvanTC95 closed 5 years ago
Is this a bug or...? @NewOldMax
Hi, can you reproduce your issue at https://codesandbox.io/s/new ?
hey @NewOldMax Please check it and tell me if i did any thing wrong here link
@DeepakM02 , I saw your codes in the given link, I couldn't identify any problem. Can you please explain what the problem is that you are having?
Validation are not working when you submit after uploading any file that does not match to rules.
@DeepakM02 check this one https://codesandbox.io/embed/bold-bush-865xl please use latest version of package if you can
This is working but my shared link is not working. What's wrong with that. did i do something wrong ? I did as they instructed in documentation.
@IvanTC95 validation is triggering after every input change. So if you don't select any file it will trigger change with undefined
value so isFile
checks this value
@DeepakM02 you can't set file
value to <input type="file">
directly so your example won't work. You can follow my code as well to build custom validations
Please Update your documentation on github and npm portal because there you gave example with
@DeepakM02 now you can see FileValidator
example in readme
I have added these props to my file input:
But when I don't add a file, it still shows "File not valid" (or the first error of the array)