Skip to content
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

Validate file extension #29

Open
jorgecas99 opened this issue May 9, 2014 · 2 comments
Open

Validate file extension #29

jorgecas99 opened this issue May 9, 2014 · 2 comments

Comments

@jorgecas99
Copy link

Can you add support for a new attribute called 'validate' or something like that where you can pass a value or values separated with commas. This way if the file doesn't have that extension it will print a error below the button?

I use your plugin all the time, thank you, unfortunately Ruby when you create the field the validation is not working right, it passes the error message to the label right after the button which looks like the button grew in height.
screen shot 2014-05-09 at 11 04 33 am

@grevory
Copy link
Owner

grevory commented May 9, 2014

What would the value be exactly?

@jorgecas99
Copy link
Author

screen shot 2014-05-09 at 2 45 20 pm
The value for what? the attribute? I was thinking that would be whatever the user wants to pass in, I was thinking something along these lines:
<input type="file" title="Upload File" class="btn-link" 'validate="jpg, png, gif" />

Notice that class is not mention in the doc but you do support it, which is cool, I found it by reading the code.

It would be nice is the validate attr throws a error to a label after the button, not the one inside of it. Like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants