directive
A directive which installs the MinValidator
for any formControlName
, formControl
, or control with ngModel
that also has a min
attribute.
input[type=number][min][formControlName]
input[type=number][min][formControl]
input[type=number][min][ngModel]
Property | Description |
---|---|
@Input()min: string | number | Tracks changes to the min bound to this directive. |
inputName: 'min' | |
normalizeInput: (input: string): number => parseFloat(input) | |
createValidator: (min: number): ValidatorFn => minValidator(min) |
The following example shows how to add a min validator to an input attached to an ngModel binding.
<input type="number" ngModel min="4">
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/forms/MinValidator