MCPcopy Index your code
hub / github.com/angular/angular / pattern

Method pattern

packages/forms/src/validators.ts:418–420  ·  view source on GitHub ↗

* @description * Validator that requires the control's value to match a regex pattern. This validator is also * provided by default if you use the HTML5 `pattern` attribute. * * @usageNotes * * ### Validate that the field only contains letters or spaces * * ```ts * const c

(pattern: string | RegExp)

Source from the content-addressed store, hash-verified

416 *
417 */
418 static pattern(pattern: string | RegExp): ValidatorFn {
419 return patternValidator(pattern);
420 }
421
422 /**
423 * @description

Callers 1

validators_spec.tsFile · 0.45

Calls 1

patternValidatorFunction · 0.85

Tested by

no test coverage detected