.number().integer() doesn't work for 2147483647 and higher. How to check, that the number is integer with more numbers (not a float, without a decimal point etc)?
yup doesn't cover that since javascript doesn't (until super recently) handle anything larger than a 32bit int. We could theoretically fallback to BitInt if the current environment handles that but thats like only really modern browsers
You can write custom test making it a number
Yup.number("Enter a valid number")
.test("int", "Must be integer", val => {
return val % 1 == 0;
});
Most helpful comment
You can write custom test making it a number