import * as Yup from 'yup'

export const validators = Yup.object({

    Salutation: Yup.string()
      .required('Salutation is required'),
    FirstName: Yup.string()
      .required('FirstName is required'),   
    LastName: Yup.string()
      .required('LastName is required'),   
    Email: Yup.string().email()        
      .required('Email is required'),
    PhoneNo: Yup.string()        
      .min(10)
      .max(10)
      .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"
      )
  })

