interface Schema.NumberBuilder
A validation builder for number values.
interface NumberBuilder extends Builder<number>;
Notes
- Returned by Schema.build.number() and provides number-specific validation methods.
Instance members
min()
Validates that the number is at least the specified value.max()
Validates that the number is at most the specified value.gt()
Validates that the number is greater than the specified value.lt()
Validates that the number is less than the specified value.gte()
Validates that the number is greater than or equal to the specified value; alias for min.lte()
Validates that the number is less than or equal to the specified value; alias for max.positive()
Validates that the number is positive (greater than 0).negative()
Validates that the number is negative (less than 0).nonnegative()
Validates that the number is non-negative (greater than or equal to 0).nonpositive()
Validates that the number is non-positive (less than or equal to 0).multipleOf()
Validates that the number is a multiple of the specified value.finite()
Validates that the number is finite (not Infinity or -Infinity).safe()
Validates that the number is within the safe integer range.int()
Validates that the number is an integer.required()
Adds a required check; returns this builder for further chaining.
Related
class Schema
A class that represents a validation schema for input values, objects, and arrays.
