You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a snippet from my yup validation schema. I would like to pass a message into the required function to display something user-friendly if they don't enter any text.
emergencyPhoneNumber: Yup.string()
.phone()
.required('Emergency contact phone number is required.'),
I know I can provide a custom error message through phone() however, as this is an add-on to yup, it should support yup's expected behavior. If possible, I would like to be able to provide an error message for when a user input's an invalid phone number and a required message if they don't input anything.
The text was updated successfully, but these errors were encountered:
Here is a snippet from my yup validation schema. I would like to pass a message into the required function to display something user-friendly if they don't enter any text.
I know I can provide a custom error message through
phone()
however, as this is an add-on to yup, it should support yup's expected behavior. If possible, I would like to be able to provide an error message for when a user input's an invalid phone number and a required message if they don't input anything.The text was updated successfully, but these errors were encountered: