A Directive that adds the required
validator to any controls marked with the
required
attribute, via the NG_VALIDATORS
binding.
NgModules
Selectors
:not([type=checkbox])[required][formControlName]
:not([type=checkbox])[required][formControl]
:not([type=checkbox])[required][ngModel]
Properties
Property |
Description |
@Input() required: boolean | string
|
|
Description
Example
<input name="fullName"
ngModel required>
<input name="fullName" ngModel required>
Methods
registerOnValidatorChange()
|
registerOnValidatorChange(fn: () => void): void
registerOnValidatorChange(fn: () => void): void
Parameters
Returns
void
|