Accepts any input that can construct a number. Validates the constructed number is valid (not NaN).
Validates that the number is safe (Number.isSafeNumber).
If you want to accept unsafe numbers, use unsafeNumber.
If you need to coerce integer, refine this schema with x.refine(Number.isInteger)
See
number
Accepts any input that can construct a number. Validates the constructed number is valid (not NaN). Validates that the number is safe (
Number.isSafeNumber
).If you want to accept unsafe numbers, use unsafeNumber.
If you need to coerce integer, refine this schema with
x.refine(Number.isInteger)
Example