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

Remove "html5_validators" gem #367

Closed
artur-intech opened this issue Feb 4, 2017 · 5 comments · Fixed by #1183
Closed

Remove "html5_validators" gem #367

artur-intech opened this issue Feb 4, 2017 · 5 comments · Fixed by #1183

Comments

@artur-intech
Copy link
Contributor

artur-intech commented Feb 4, 2017

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">.

@vohmar
Copy link
Contributor

vohmar commented Feb 8, 2017

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.

@artur-intech
Copy link
Contributor Author

artur-intech commented Feb 8, 2017

OK. The ticket is about changing the way client-side validation is performed, not about removal of it.

@artur-intech
Copy link
Contributor Author

The longer this task is postponed, the longer it will take to get rid of it.

@teadur
Copy link
Contributor

teadur commented Nov 20, 2017

What is the proposed new solution ?

@artur-intech
Copy link
Contributor Author

artur-intech commented Sep 9, 2018

The solution is to use native HTML validation in a controlled manner, instead of relying on some plugin, which does that (poorly) automatically.

artur-intech pushed a commit that referenced this issue May 2, 2019
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

Successfully merging a pull request may close this issue.

3 participants