feat(forms): add email validator (#13709)
Closes #13706 PR Close #13709
This commit is contained in:

committed by
Miško Hevery

parent
00979838ef
commit
d69717cf79
12
tools/public_api_guard/forms/index.d.ts
vendored
12
tools/public_api_guard/forms/index.d.ts
vendored
@ -150,6 +150,15 @@ export declare class DefaultValueAccessor implements ControlValueAccessor {
|
||||
writeValue(value: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class EmailValidator implements Validator {
|
||||
email: boolean | string;
|
||||
registerOnValidatorChange(fn: () => void): void;
|
||||
validate(c: AbstractControl): {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface Form {
|
||||
addControl(dir: NgControl): void;
|
||||
@ -529,6 +538,9 @@ export interface ValidatorFn {
|
||||
export declare class Validators {
|
||||
static compose(validators: ValidatorFn[]): ValidatorFn;
|
||||
static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn;
|
||||
static email(control: AbstractControl): {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
static maxLength(maxLength: number): ValidatorFn;
|
||||
static minLength(minLength: number): ValidatorFn;
|
||||
static nullValidator(c: AbstractControl): {
|
||||
|
Reference in New Issue
Block a user