Skip to content

Instantly share code, notes, and snippets.

@diego3g
Last active October 31, 2017 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diego3g/55acb8c26e465cd35fb0f2770fcf2f2b to your computer and use it in GitHub Desktop.
Save diego3g/55acb8c26e465cd35fb0f2770fcf2f2b to your computer and use it in GitHub Desktop.
export default withFormik({
mapPropsToValues: () => ({ email: '', password: '' }),
validationSchema: Yup.object().shape({
email: Yup.string()
.email('Digite um e-mail válido')
.required('Preencha o campo de e-mail'),
password: Yup.string()
.min(6, 'A senha deve ter no mínimo 6 caracteres')
.required('Preencha o campo de senha'),
}),
handleSubmit: (values) => {
...
}
})(App);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment