Eulis

Login validation js

Jan 21st, 2020
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import * as yup from 'yup';
  2.  
  3. const schema = yup.object().shape({
  4. email: yup
  5. .string()
  6. .required('* Campo obrigatório!')
  7. .email('E-mail inválido!'),
  8. password: yup
  9. .string()
  10. .required('* Campo obrigatório!')
  11. .min(8, '* A senha deve conter no mínimo 8 dígitos!'),
  12. });
  13.  
  14. export default schema;
Advertisement
Add Comment
Please, Sign In to add comment