isLt function

Validator isLt(
  1. num max
)

Checks whether the given value is less than max

Implementation

Validator isLt(num max) {
  return and(
    isType<num>(),
    (value) => Result(
      isValid: value < max,
      expected: 'less than $max',
      value: value,
    ),
  );
}