填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫Home

MinValidator

A directive which installs the MinValidatorfor any formControlName, formControl, or control with ngModel that also has a min attribute.

參見

Exported from

選擇器

屬性

屬性說明
@Input()
min: string | number

Tracks changes to the min bound to this directive.

說明

Adding a min validator

The following example shows how to add a min validator to an input attached to an ngModel binding.

      
      <input type="number" ngModel min="4">