Skip to content

Broken JS initialization - Nette disables HTML5 validation #82

@jkufner

Description

@jkufner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions