UNPKG

@alauda-fe/common

Version:

Alauda frontend team common codes.

21 lines (20 loc) 1.48 kB
import { MaxLengthValidator, MinLengthValidator } from '@angular/forms'; import * as i0 from "@angular/core"; /** * 功能和 MaxLengthValidator 完全一样,唯一的区别就是不设置 host maxlength attribute * 使用场景:ngModel 的表单希望设置 maxlength validator 但不相限制输入框输入的字符。 * 比如产品希望最长 20 个字符,超过 20 个字符红色提醒 * https://github.com/angular/angular/blob/main/packages/forms/src/directives/validators.ts#L591 */ export declare class MaxLengthValidatorDirective extends MaxLengthValidator { aclMaxlength: string | number; inputName: string; static ɵfac: i0.ɵɵFactoryDeclaration<MaxLengthValidatorDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MaxLengthValidatorDirective, "[aclMaxlength][formControlName],[aclMaxlength][formControl],[aclMaxlength][ngModel]", never, { "aclMaxlength": { "alias": "aclMaxlength"; "required": false; }; }, {}, never, never, true, never>; } export declare class MinLengthValidatorDirective extends MinLengthValidator { aclMinlength: string | number; inputName: string; static ɵfac: i0.ɵɵFactoryDeclaration<MinLengthValidatorDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<MinLengthValidatorDirective, "[aclMinlength][formControlName],[aclMinlength][formControl],[aclMinlength][ngModel]", never, { "aclMinlength": { "alias": "aclMinlength"; "required": false; }; }, {}, never, never, true, never>; }