Last active
August 2, 2019 11:13
-
-
Save giovanigenerali/b458d2f7475ee073611c198f1c3281a8 to your computer and use it in GitHub Desktop.
Yup test()
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
const validationSchema = Yup.object({ | |
email: Yup | |
.string() | |
.trim() | |
.email('Informe um e-mail válido') | |
.required('Informe seu e-mail'), | |
password: Yup | |
.string() | |
.min(6, 'A senha deve conter no mínimo 6 caracteres') | |
.required('Informe sua senha'), | |
.test({ | |
name: 'password-strength', | |
test: value => value !== '123456', | |
message: 'A sua senha é fraca', | |
}), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment