Angular 9 References/ Forms

[required] validation directive

This is the documentation for Angular 9.
You can switch to the latest version Angular 10.

A directive that adds the required validator to any controls marked with the required attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

Adding a required validator using template-driven forms

<input name="fullName" ngModel required>