MCPcopy Create free account
hub / github.com/angular/angular / PatternValidator

Class PatternValidator

packages/forms/src/directives/validators.ts:686–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684 standalone: false,
685})
686export class PatternValidator extends AbstractValidatorDirective {
687 /**
688 * @description
689 * Tracks changes to the pattern bound to this directive.
690 */
691 @Input()
692 pattern!: string | RegExp; // This input is always defined, since the name matches selector.
693
694 /** @internal */
695 override inputName = 'pattern';
696
697 /** @internal */
698 override normalizeInput = (input: string | RegExp): string | RegExp => input;
699
700 /** @internal */
701 override createValidator = (input: string | RegExp): ValidatorFn => patternValidator(input);
702}

Callers

nothing calls this directly

Calls 2

InputInterface · 0.90
patternValidatorFunction · 0.90

Tested by

no test coverage detected