RequiredValidator class

A Directive adding a required validator to controls with required:

<input ngControl="fullName" required />

A required control must have a non-empty value.

Implemented types
Annotations
  • @Directive(selector: '' '[required][ngControl],' '[required][ngFormControl],' '[required][ngModel]', providers: [ExistingProvider.forToken(NG_VALIDATORS, RequiredValidator)])

Constructors

RequiredValidator()

Properties

hashCode int
The hash code for this object.
no setterinherited
required bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(AbstractControl c) Map<String, dynamic>?
Returns a map of the errors associated with this control.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited