Created
June 1, 2020 03:01
-
-
Save bicknest/2c57a4b00edd97f6d2f9456586a3f84b to your computer and use it in GitHub Desktop.
SchemaValidation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ProfileFormSchema = Yup.object().shape({ | |
name: Yup.string().required("Required"), | |
age: Yup.number(), | |
phoneNumber: Yup.string() | |
.matches(phoneRegExp, "Phone is not valid") | |
.required("Required"), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment