Last active
December 30, 2021 23:21
-
-
Save HonzaMac/3a8226e02c9834d38ccd9d3f6a8fbf2e to your computer and use it in GitHub Desktop.
user entity in yup schema
This file contains hidden or 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 { object, string } from "yup" | |
export const userSchema = object({ | |
id: string().uuid(), | |
username: string().required(), | |
email: string().email().required(), | |
country: string().required(), | |
department: string().required(), | |
divisionName: string().required(), | |
city: string().optional(), | |
}).required(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment