MaxValidator
A directive which installs the MaxValidator
for any formControlName
,
formControl
, or control with ngModel
that also has a max
attribute.
See also
Exported from
Selectors
input[type=number][max][formControlName]
input[type=number][max][formControl]
input[type=number][max][ngModel]
Properties
Property | Description |
---|---|
@Input()
|
Tracks changes to the max bound to this directive. |
Description
Adding a max validator
The following example shows how to add a max validator to an input attached to an ngModel binding.
<input type="number" ngModel max="4">