New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] input[type="file"] #989
Comments
Ok, IIC, you want to add a So I think it would be nice to support type=file too. Since we aim to support IE8/9 too, we should issue a warning in those cases, and continue using the basic data form unless it's a file. Any chance you'd be able to provide a PR for this? |
No, not a remote validator. Regular front-end validation using FormData() I know that FormData works only in modern browsers, and there's no reasonable polyfill for IE<10. So maybe it would be better to deliver it as a plugin (an additional validator) not as a core feature? Here's an example of max file size valiadtor: http://jsfiddle.net/milz/pfn8fwn3/1/ Implementing this feature in 2.x version is tricky because it's not possible to get the reference to DOM object in the callback function of Correct me if I'm wrong. |
I'm glad to report that it is easy to validate this in 2.2, since the arguments passed to the validators are: |
Thank you. I was using an older version. Thanks to this feature I was able to create a code sample for basic |
I've added this to our custom validator example |
Is there any chance to implement file input validation using FormData()? It's supported by all major browsers (and IE>=10): http://caniuse.com/#search=FormData
The text was updated successfully, but these errors were encountered: