{ "id": "api/forms/MinValidator", "title": "MinValidator", "contents": "\n\n
\n
\n
\n \n API > @angular/forms\n
\n \n
\n \n
\n

MinValidatorlink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

A directive which installs the MinValidator for any formControlName,\nformControl, or control with ngModel that also has a min attribute.

\n\n \n
\n \n \n \n \n
\n

See alsolink

\n \n
\n\n\n

NgModuleslink

\n\n\n\n \n
\n

Selectorslink

\n \n \n \n
\n\n\n\n \n\n
\n

Propertieslink

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
PropertyDescription
\n \n @Input()
min: string | number
\n
\n \n

Tracks changes to the min bound to this directive.

\n\n \n
\n
\n\n\n\n \n\n\n \n
\n

Descriptionlink

\n \n

Adding a min validatorlink

\n

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

\n\n<input type=\"number\" ngModel min=\"4\">\n\n\n
\n \n\n \n\n \n\n \n\n \n \n \n\n
\n
\n\n\n" }