Skip to content

greaterThan

Validates that a numeric value is greater than (or equal to) a minimum.

Options

OptionTypeDefaultDescription
minnumberrequiredMinimum allowed value
inclusivebooleantrueIf true, the minimum value itself is valid
messagestringlocale defaultCustom error message

Playground

Valid values

ValueNotes
"1"Above min=0
"100"Well above min

Invalid values

ValueReason
"-1"Below min=0
"0"Equal to min when inclusive: false
"abc"Not a number

Notes

  • Empty string ("") always returns valid: true — validators only run on non-empty values. Combine with notEmpty to require a value.
  • With inclusive: true (default), the boundary value itself is valid.

Released under the MIT License.