Back to Tips

ngNativeValidate

Angular automatically adds the novalidate attribute to the <form> element whenever FormsModule or ReactiveFormsModule is imported. This prevents the browser from displaying the native DOM validation UI. If you want to explicitly enable native DOM validation UI with Angular forms, you can add the ngNativeValidate attribute to the <form> element.

<form ngNativeValidate>...</form>

Support

If you enjoyed this tip and found it useful, consider buying me a coffee. Thanks in advance!

Buy Me a Coffee at ko-fi.com
Using Angular v.18.0.6 🚀