We make validation for number type, format, minValue and maxValue fields. That means we handle it on our side so you get an error for invalid values.
Examples:
s.number().format('float').int() // error in type!
s.int().const(3.4) // error in type!
s.number().int().format('float') // error in format!
s.number().int().format('double') // error in format!
// ranges are also check for possibility
s.number().min(5).max(3) // error in range!
s.number().min(3).max(5).const(10) // error in constant!
We make validation for number
type
,format
,minValue
andmaxValue
fields. That means we handle it on our side so you get an error for invalid values.Examples: