• Overview
@angular/forms/signals

email

function

Binds a validator to the given path that requires the value to match the standard email format. This function can only be called on string paths.

API

function email<TPathKind extends PathKind = PathKind.Root>(
  path: { [ɵɵTYPE]: [string, TPathKind] },
  config?: BaseValidatorConfig<string, TPathKind> | undefined,
): void;

email

void

Binds a validator to the given path that requires the value to match the standard email format. This function can only be called on string paths.

@parampath{ [ɵɵTYPE]: [string, TPathKind]; }

Path of the field to validate

@paramconfigBaseValidatorConfig<string, TPathKind> | undefined

Optional, allows providing any of the following options:

  • error: Custom validation error(s) to be used instead of the default ValidationError.email() or a function that receives the FieldContext and returns custom validation error(s).
@returnsvoid
Jump to details