Skip to content

Instantly share code, notes, and snippets.

@mauricedb
Created June 26, 2019 10:07
Show Gist options
  • Save mauricedb/2199198f887bf891c3796f3257c9914a to your computer and use it in GitHub Desktop.
Save mauricedb/2199198f887bf891c3796f3257c9914a to your computer and use it in GitHub Desktop.
const personSchema = yup.object({
firstName: yup.string(),
nickName: yup.string().nullable(),
email: yup
.string()
.nullable()
.notRequired()
.email(),
birthDate: yup
.date()
.nullable()
.notRequired()
.min(new Date(1900, 0, 1))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment