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

Class MaxLengthValidator

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

Source from the content-addressed store, hash-verified

628 standalone: false,
629})
630export class MaxLengthValidator extends AbstractValidatorDirective {
631 /**
632 * @description
633 * Tracks changes to the maximum length bound to this directive.
634 */
635 @Input() maxlength!: string | number | null;
636
637 /** @internal */
638 override inputName = 'maxlength';
639
640 /** @internal */
641 override normalizeInput = (input: string | number): number => toInteger(input);
642
643 /** @internal */
644 override createValidator = (maxlength: number): ValidatorFn => maxLengthValidator(maxlength);
645}
646
647/**
648 * @description

Callers

nothing calls this directly

Calls 3

InputInterface · 0.90
maxLengthValidatorFunction · 0.90
toIntegerFunction · 0.85

Tested by

no test coverage detected