docs: added description for `novalidate` form attribute. (#35166)

PR Close #35166
This commit is contained in:
Francesco Leardini 2020-02-05 15:59:06 +01:00 committed by Kara Erickson
parent 76b77ec3c2
commit 9a55020286
1 changed files with 14 additions and 0 deletions

View File

@ -90,6 +90,20 @@ const resolvedPromise = (() => Promise.resolve(null))();
* </form>
* ```
*
* ### Native DOM validation UI
*
* In order to prevent the native DOM form validation UI from interfering with Angular's form
* validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever
* `FormModule` or `ReactiveFormModule` are imported into the application.
* If you want to explicitly enable native DOM validation UI with Angular forms, you can add the
* `ngNativeValidate` attribute to the `<form>` element:
*
* ```html
* <form ngNativeValidate>
* ...
* </form>
* ```
*
* @ngModule FormsModule
* @publicApi
*/