import * as Yup from 'yup'

export const validators = Yup.object({
  Salutation: Yup.string()
  .required('Salutation is required'),
  FirstName: Yup.string()
    .required('First Name is required'),
  LastName: Yup.string()
    .required('Last Name is required'),
  City: Yup.string()
    .required('City is required'),
  Street: Yup.string()
    .required('Street is required'),
  State: Yup.string()
    .required('State is required'),
  PinCode: Yup.string()
    .required('Pin code is required')
    .matches(/^[1-9]{1}[0-9]{2}[0-9]{3}$/, "Pin code is invalid"),
  Country: Yup.string()
    .required('Country is required'),
  PhoneNo: Yup.string()
    .required('Phone number is required')
    .matches(
      /^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/,
      "Phone number is not valid"
    ),    
  Email: Yup.string().email()
  .required('Email is required'),
  RegisterReason: Yup.string()
  .required('Register reason is required'),
  })

