(control: AbstractControl)
| 517 | * See `Validators.email` for additional information. |
| 518 | */ |
| 519 | export function emailValidator(control: AbstractControl): ValidationErrors | null { |
| 520 | if (isEmptyInputValue(control.value)) { |
| 521 | return null; // don't validate empty values to allow optional controls |
| 522 | } |
| 523 | return EMAIL_REGEXP.test(control.value) ? null : {'email': true}; |
| 524 | } |
| 525 | |
| 526 | /** |
| 527 | * Validator that requires the number of items in the control's value to be greater than or equal |
no test coverage detected
searching dependent graphs…