Constructor
Allos Infinite values By default, infinite values are ignored, and default value is set.
self
Allows NaN as an option. By default, if NaN, the default value is set.
self
Forces number to integer
self
Gets the raw schema, as object type
Provides the reason test() returned false, if any
The object to test
The provided error
Sanitizes an object.
The object to test
The sanitized object
Tests the schema against an object
The object to test
true if it matches the schema, false if it does not match
Sets default value, in case the object is null, undefined or cannot be parsed
The default value
self
Sets an enumeration of allowed values
The enumeration
self
Sets the max value. if the value is greater, this value will be set.
The max value
self
Sets the min value. If the value is lower, this value will be set.
The min value
self
Creates number schema
a new instance of NumberObjectSchema
Generated using TypeDoc
Schema for Number