lessThan validator

Check if the value is less than or equals to given number


Using with form field

* presents a required option. The HTML attributes are used to set the validator options via the Declarative plugin

Name HTML attribute Type Description
inclusive data-fv-less-than___inclusive Boolean Can be true (default) or false.
If true, the input value must be less than or equal to the comparison one.
If false, the input value must be less than the comparison one.
max* data-fv-less-than___max Float The number to make a comparison to
message data-fv-less-than___message String The error message

Using with ES6 module

ES6 Module Example

The following snippet shows how to use the lessThan validator with ES6 module:

Related validators

The following validators might be useful to you.