core/forms/emails-validator.directive.ts
A directive that adds the emails
validator to controls marked with the
emails
attribute. The directive is provided with the NG_VALIDATORS
multi-provider list.
<input type="text" name="emails" ngModel emails>
<input type="text" name="emails" ngModel emails="true">
<input type="text" name="emails" ngModel [emails]="true">
Validator
Providers |
{ provide: NG_VALIDATORS, useExisting: EmailsValidatorDirective, multi: true }
|
Selector | [emails][formControlName],[emails][formControl],[emails][ngModel] |
Methods |
Inputs |
Accessors |
emails |
Type : boolean | string
|
Tracks changes to the emails attribute bound to this directive. |
registerOnValidatorChange | ||||||
registerOnValidatorChange(fn: () => void)
|
||||||
Registers a callback function to call when the validator inputs change.
Parameters :
Returns :
void
|
emails | ||||||
setemails(value: boolean | string)
|
||||||
Tracks changes to the emails attribute bound to this directive.
Parameters :
Returns :
void
|