Skip to content

Instantly share code, notes, and snippets.

@lucassimon
Created June 8, 2021 18:46
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 lucassimon/7845a910b02816956e8b3920699cdd86 to your computer and use it in GitHub Desktop.
Save lucassimon/7845a910b02816956e8b3920699cdd86 to your computer and use it in GitHub Desktop.
const schema = yup.object().shape({
email: yup.string().email("Formato de e-mail inválido").required("Preenchimento obrigatório"),
fullname: yup.string().required().min(9, "Insira seu nome completo"),
cpf: yup.string().required("Preenchimento Obrigatorio"),
cellphone: yup.number().required("Preenchimento Obrigatorio"),
state: yup.string().required("Preenchimento Obrigatorio"),
city: yup.string().required("Preenchimento Obrigatorio"),
password: yup.string().required("Preenchimento Obrigatorio"),
repeatPassword: yup.string().required("Preenchimento Obrigatorio"),
receiveMessagesCheckbox: yup.boolean(),
agreeWithTerms: yup.boolean().required("Você precisa concordar com os termos")
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment