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

HTML5 validation for the input control #499

Open
akoval opened this issue Mar 14, 2016 · 4 comments
Open

HTML5 validation for the input control #499

akoval opened this issue Mar 14, 2016 · 4 comments
Labels

Comments

@akoval
Copy link

akoval commented Mar 14, 2016

Numeric input control can be invalid (for example<input type=number> with 123....456 text).
but validation mechanism returns OK.

It uses this.$el.val() which returns empty for invalid control. As a result all validators passed (except required validator). So for optional fields form will be always committed to server with incorrect input.

Maybe need to add some checking to verify control state?
something like:
this.$el.is(':invalid')

@akoval akoval changed the title HTML5 validation for the control HTML5 validation for the input control Mar 14, 2016
@glenpike
Copy link
Collaborator

glenpike commented Apr 1, 2016

This seems more like a roadmap thing to consider - making validation work with HTML5 elements. We should probably discuss this @exussum12 @powmedia ?

@exussum12
Copy link
Collaborator

Agreed, The support for these elements is pretty small currently. This should be supported though as the usage will rise

@powmedia
Copy link
Owner

I've been using HTML5 validation more and more, it could be a good idea to
at least use the same API and polyfill where required? Could use existing
libraries for that.

On Fri, Apr 29, 2016 at 7:59 PM Scott Dutton [email protected]
wrote:

Agreed, The support for these elements is pretty small currently. This
should be supported though as the usage will rise


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#499 (comment)

@philfreo
Copy link
Collaborator

philfreo commented Apr 29, 2016

The support is actually very good these days (94% global support):
http://caniuse.com/#search=validation

+1 for having an optional polyfill for the remaining browsers

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

No branches or pull requests

5 participants