-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always False when value is undefined #718
Comments
My team is facing the same issue
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using Yup-phone & Yup on a react project to validate data of formik forms, but my phone field is not mandatory and could have a value undefined.
Using yup phone, when my phone field is undefined, Yup always considers it as an error but it is wrong. Reading the code, we should consider that value could be undefined, so the test does not fail.
That is an example of phone implement you could consider :
Here is an example of my usage:
Thanks to my previous proposal, I have no error when phone is not mandatory (ie undefined)
The text was updated successfully, but these errors were encountered: