Which attribute can be added to a form control to make it required?

  • [ngRequired]
  • [required]
  • [validate]
  • [isRequired]
In template-driven forms, the [required] attribute can be added to a form control to make it required. When this attribute is present on an input element, the user must fill in the control before submitting the form. It's a simple way to implement basic form validation for mandatory fields. The other options are not standard attributes for making form controls required in Angular template-driven forms.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *