Class Overview
class PatternValidator implements Validator, pattern: string|RegExp
ngOnChanges(changes: SimpleChanges) : void
validate(c: AbstractControl) : ValidationErrors|
}
Selectors
[pattern][formControlName]
[pattern][formControl]
[pattern][ngModel]
Class Description
A Directive that adds the pattern validator to any controls marked with the
pattern attribute, via the NG_VALIDATORS binding. Uses attribute value
as the regex to validate Control value against. Follows pattern attribute
semantics; i.e. regex must match entire Control value.
Example
Class Details
exported from forms/index, defined in forms/src/directives/validators.ts