text: import { validatorFactory } from '../../../app/utils/reduxForm';
  
  const schema = {
    name: {
      presence: {
        message: '^Name cannot be blank.',
      },
    },
    email: {
      presence: {
        message: '^Email cannot be blank',
      },
      email: {
        message: '^Email not valid',
      },
      emailDomain : {
        message: '^Invalid Email domain',
      },
    },
    phone: {
      presence: {
        message: '^Phone number cannot be blank',
      },
      format: {
        // must be a phone in the format of (123) 456-7890 or E.164 format phone numbers
        pattern: '^\\(\\d{3}\\)\\s?\\d{3}\\-\\d{4}|\\+?[1-9]\\d{1,14}$',
        message: '^Invalid phone number',
      },
    },
  };
  
  const fields = Object.keys(schema);
  
  export { fields };
  
  export default validatorFactory(schema);
  