Protected isProtected preprocessorsA list of preprocessors associated with the Builder
Protected typeProtected validatorsA list of validators associated with the Builder
Adds a preprocessor to a preprocessors list
Adds a validator to validators list.
Consider Infinity as valid.
Consider NaN value as valid
Clear equals() call.
Clear max() call.
Clear min() call.
Remove all preprocessors for this schema.
Remove all validators for this schema.
Protected createProtected method used to create an new instance of the Builder
defined by the props object. Should be used to instanticate new
builders to keep builder's immutability.
arbitrary props object
Restricts number to be equal to value.
Generates a serializable object describing the defined schema
Make sure that object is not different kinds of infinity. true by default.
Make sure that object is not NaN. true by default.
If set, restrict object to be equal to a certain value.
Allow only integer values (floating point values will be rejected as invalid)
If set to false, schema will be optional (null or undefined values
will be considered as valid).
Max valid value (if defined).
Min valid value (if defined).
Array of preprocessor functions
String id of schema type, e.g. string', numberorobject`.
Array of validator functions
Do not accept Infinity.
Float values will be considered as valid after this call.
Only integer values will be considered as valid after this call.
Restrict number to be no more than maxValue.
Restrict number to be at least minValue.
Do not accept NaN value
Protected prePerforms validion of number schema over object.
Optional context: ValidationContextOptional ValidationContext settings.
Static createGenerated using TypeDoc
Number schema builder class. Allows to create Number schemas. Can be required or optional, can be restricted to be equal to a certain value, can be restricted to be in a certain range, can be restricted to be integer.
NOTE this class is exported only to give opportunity to extend it by inheriting. It is not recommended to create an instance of this class directly. Use () function instead.
Example
Example
Example
Example
See
number