Skip to content

Instantly share code, notes, and snippets.

@janhesters
Created September 24, 2018 21:06
Show Gist options
  • Save janhesters/112baf001fc51cee7f41a9e998128f6e to your computer and use it in GitHub Desktop.
Save janhesters/112baf001fc51cee7f41a9e998128f6e to your computer and use it in GitHub Desktop.
import { object as yupObject, string as yupString } from "yup";
// ...
validationSchema={yupObject().shape({
email: yupString()
.email(strings.invalidEmailFormat)
.required(strings.emailRequired),
password: yupString()
.min(8, strings.passwordMinLength)
.required(strings.passwordRequired)
})}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment