PatternValidator class
A Directive
that adds a pattern validator to any controls with pattern
:
<input ngControl="fullName" pattern="[a-zA-Z ]*" />
The attribute value is parsed and used as a RegExp to validate the control value against. The regular expression must match the entire control value.
- Implemented types
- Annotations
-
- @Directive(selector: '' '[pattern][ngControl],' '[pattern][ngFormControl],' '[pattern][ngModel]', providers: [ExistingProvider.forToken(NG_VALIDATORS, PatternValidator)])
Constructors
Properties
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