You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

registerSchema.js 680B

1234567891011121314151617
  1. import * as Yup from 'yup';
  2. export const registerSchema = Yup.object().shape({
  3. fullName: Yup.string().required('Full name is required'),
  4. username: Yup.string().required('Username is required'),
  5. email: Yup.string().email().required('Email is required'),
  6. password: Yup.string().required('Password is required'),
  7. confirmPassword: Yup.string().oneOf(
  8. [Yup.ref('password'), null],
  9. 'Passwords must match'
  10. ),
  11. address: Yup.string().required('Address is required'),
  12. address2: Yup.string(),
  13. city: Yup.string().required('City is required'),
  14. country: Yup.string().required('Country is required'),
  15. postcode: Yup.string().required('Postal code is required'),
  16. });