-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
More HTML5 goodness, please! #46
Comments
I believe |
I've read through NumericalityValidator, and there's no public API exposed that could be used. Is it okay if I cheat and use the private internals of the class? What's your policy on that? |
You can use the public API:
You can detect if there is an NumericalityValidator and get its options to create the needed html attributes. |
I sent a pull request at http://github.com/plataformatec/simple_form/pull/47 |
The pull request issue is at #47. |
Seeing as Chrome 6 now joins Safari in adding custom UI on top of
<input type="number"/>
elements, it would be awesome if it was easier to add the new attributes to the element.In particular,
min
,max
, andstep
would improve the experience, also on mobile devices.Could these be inferred by the presence of a
NumericalityValidator
? Otherwise, allowing these options directly in theinput
call would be preferred over having to use:input_html
.I love simple_form!
The text was updated successfully, but these errors were encountered: