Created
May 2, 2021 06:56
-
-
Save mrkacan/d5eb62195ac32a6367acbc6b62a0ba1b to your computer and use it in GitHub Desktop.
Yup User Info Schema
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
import * as Yup from "yup"; | |
const userInfoSchema = Yup.object().shape({ | |
firstName: Yup.string() | |
.min(4, "First name should be minimum 4 character") | |
.required("First name is required"), | |
lastName: Yup.string() | |
.min(5, "Last name should be minimum 5 character") | |
.required("Last name is required"), | |
email: Yup.string() | |
.email("Please type correct email address") | |
.required("Email is required") | |
}); | |
export { userInfoSchema }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment