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

Broken JS initialization - Nette disables HTML5 validation #82

Closed
jkufner opened this issue May 26, 2015 · 1 comment
Closed

Broken JS initialization - Nette disables HTML5 validation #82

jkufner opened this issue May 26, 2015 · 1 comment

Comments

@jkufner
Copy link

jkufner commented May 26, 2015

netteForms.js, line 515:

form.noValidate = 'novalidate';

Nette does not check whether given form is produced by Nette or other library and disables HTML5 validation for all forms. It is OK to do whatever Nette wants with forms created by Nette, but it must not touch other forms. When part of application uses another library, this behavior breaks things a lot.

Sollution: Do not set novalidate on entire form. Set it for individual inputs when nette attributes (e.g. data-nette-rules) are detected and processed. Or just don't use it when it is not required.

@jkufner
Copy link
Author

jkufner commented May 26, 2015

... Nette Forms v2.3.2

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

1 participant