MCPcopy Index your code
hub / github.com/angular/angular / emailValidator

Function emailValidator

packages/forms/src/validators.ts:519–524  ·  view source on GitHub ↗
(control: AbstractControl)

Source from the content-addressed store, hash-verified

517 * See `Validators.email` for additional information.
518 */
519export 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

Callers 1

emailMethod · 0.85

Calls 2

isEmptyInputValueFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…