Validates that a numeric field is greater than the specified value
⚠️ Only applicable for integer or float fields
The value that the field must be greater than
Optional
errorMessage: stringOptional custom error message
// Integer field example
a.integer().validate(v => v.gt(10, 'Integer must be greater than 10'))
// Float field example
a.float().validate(v => v.gt(3.14, 'Float must be greater than 3.14'))
Validates that a numeric field is greater than or equal to the specified value
⚠️ Only applicable for integer or float fields
The value that the field must be greater than or equal to
Optional
errorMessage: stringOptional custom error message
// Integer field example
a.integer().validate(v => v.gte(10, 'Integer must be greater than or equal to 10'))
// Float field example
a.float().validate(v => v.gte(3.14, 'Float must be greater than or equal to 3.14'))
Validates that a numeric field is less than the specified value
⚠️ Only applicable for integer or float fields
The value that the field must be less than
Optional
errorMessage: stringOptional custom error message
// Integer field example
a.integer().validate(v => v.lt(10, 'Integer must be less than 10'))
// Float field example
a.float().validate(v => v.lt(3.14, 'Float must be less than 3.14'))
Validates that a numeric field is less than or equal to the specified value
⚠️ Only applicable for integer or float fields
The value that the field must be less than or equal to
Optional
errorMessage: stringOptional custom error message
// Integer field example
a.integer().validate(v => v.lte(10, 'Integer must be less than or equal to 10'))
// Float field example
a.float().validate(v => v.lte(3.14, 'Float must be less than or equal to 3.14'))
Validates that a numeric field is negative
⚠️ Only applicable for integer or float fields
Optional
errorMessage: stringOptional custom error message
// Integer field example
a.integer().validate(v => v.negative('Integer must be negative'))
// Float field example
a.float().validate(v => v.negative('Float must be negative'))
Validates that a numeric field is positive
⚠️ Only applicable for integer or float fields
Optional
errorMessage: stringOptional custom error message
// Integer field example
a.integer().validate(v => v.positive('Integer must be positive'))
// Float field example
a.float().validate(v => v.positive('Float must be positive'))
Interface for numeric validation methods without any exclusions