message: refactor(forms): update `PatternValidator` to inherit `AbstractValidatorDirective`
  This commit updates the `PatternValidator` class to inherit `AbstractValidatorDirective` to make it conistent with other validators.
  Closes angular#42267
  PR Close
diff: @@ -638,12 +638,9 @@ export const PATTERN_VALIDATOR: any = {
  @Directive({
  selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',
  providers: [PATTERN_VALIDATOR],
  - host: {'[attr.pattern]': 'pattern ? pattern : null'}
  + host: {'[attr.pattern]': '_enabled ? pattern : null'}
  })
  -export class PatternValidator implements Validator, OnChanges {
  - private _validator: ValidatorFn = nullValidator;
  - private _onChange?: () => void;
  -
  +export class PatternValidator extends AbstractValidatorDirective {
  /**
  * @description
  * Tracks changes to the pattern bound to this directive.
  @@ -651,31 +648,12 @@ export class PatternValidator implements Validator, OnChanges {
  @Input()
  pattern!: string|RegExp; // This input is always defined, since the name matches selector.
  - /** @nodoc */
  - ngOnChanges(changes: SimpleChanges): void {
  - if ('pattern' in changes) {
  - this._createValidator();
  - if (this._onChange) this._onChange();
  - }
  - }
  -
  - /**
  - * Method that validates whether the value matches the pattern requirement.
  - * @nodoc
  - */
  - validate(control: AbstractControl): ValidationErrors|null {
  - return this._validator(control);
  - }
  + /** @internal */
  + override inputName = 'pattern';
  - /**
  - * Registers a callback function to call when the validator inputs change.
  - * @nodoc
  - */
  - registerOnValidatorChange(fn: () => void): void {
  - this._onChange = fn;
  - }
  + /** @internal */
  + override normalizeInput = (input: string|RegExp): string|RegExp => input;
  - private _createValidator(): void {
  - this._validator = patternValidator(this.pattern);
  - }
  + /** @internal */
  + override createValidator = (input: string|RegExp): ValidatorFn => patternValidator(input);
  }
  