[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/forms/RequiredValidator [Back]  [Original]

RequiredValidator Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/forms

RequiredValidator

directive
stable

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.

Form Validation

On this page

    arrow_upward_alt Back to the top

    API

        
          class RequiredValidator extends AbstractValidatorDirective {  @Input() required: string | boolean;}
        
        

    required

    string | boolean

    Tracks changes to the required attribute bound to this directive.

    Description

    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.

    Exported by

    Jump to details

    Web Proxy Viewer  |  New URL  |  Original Page