Skip to content

Reactive Forms guide could be more precise on HTML5 native validators #39549

@lukasmatta

Description

@lukasmatta

In the Reactive Forms guide, a user is encouraged to use native HTML5 attributes for validation such as required, minlength or maxlength. However, the default behavior of Angular reactive form is that it adds novalidate attribute to the form, which prevents native validators from functioning.

To prevent misunderstanding, I would suggest adding information, that in order for HTML5 validators to work properly, one needs to add ngNativeValidate directive to the form.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions