-
Notifications
You must be signed in to change notification settings - Fork 19
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
Remove "html5_validators" gem #367
Comments
just to be clear, we validate user input on both client and server side. Client side validation is meant to keep away obviously invalid input. But the client side validations are duplicate of subset of validations on server side. We validate on client side that for example phone number and date format is correct, that user cannot send birthday as ident if country is Estonia etc. |
OK. The ticket is about changing the way client-side validation is performed, not about removal of it. |
The longer this task is postponed, the longer it will take to get rid of it. |
What is the proposed new solution ? |
The solution is to use native HTML validation in a controlled manner, instead of relying on some plugin, which does that (poorly) automatically. |
I consider the idea to let this "plugin" set client-side validation globally quite inflexible and against least surprise principle.
app/models/concerns/disable_html5_validation.rb
Under some circumstances the generated output is totally wrong:
<input ... min="min_amount">
.The text was updated successfully, but these errors were encountered: