numberField: Yup.number("Not a numbBar")
.integer("Please enter a whole number")
.required("Please enter price, enter 0 for a free class"),
Cannot seem to find in docs how to display a custom message, for .number()?
1 - number; 2 - integer; 3 - required.
2 and 3 works as expected.
3 - .number() returns this:
numberField must be anumbertype, but the final value was:NaN(cast from the value"foobar ").
Would like to return a custom message
Thanks
.typeError() I believe is the method for setting that
.typeError()I believe is the method for setting that
Thank you sir, this is what I was looking for!
.typeError()I believe is the method for setting that
how do you get to use it
amount: Yup.number().typeError("Must be a number"),
How do I remove the array sign [missing....]
Most helpful comment
.typeError()I believe is the method for setting that