MaxValidator
A directive which installs the MaxValidatorfor any formControlName, formControl, or control with ngModel that also has a max attribute.
参见
Exported from
选择器
input[type=number][max][formControlName]input[type=number][max][formControl]input[type=number][max][ngModel]
属性
| 属性 | 说明 |
|---|---|
@Input() | Tracks changes to the max bound to this directive. |
说明
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">