lessThan method

Validator lessThan(
  1. num maxValue, {
  2. String? errorMessage,
})

Adds a LessThanRule to the validator.

maxValue is the maximum value allowed. errorMessage is the optional error message to display if validation fails.

Implementation

Validator lessThan(num maxValue, {String? errorMessage}) {
  addRule(LessThanRule(maxValue, errorMessage: errorMessage));
  return this;
}