text: export const required = value => (value ? undefined : 'Required')
  
  export const validateEmail = value =>
    value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)
      ? 'Invalid email address'
      : undefined
  
  export const validateDatabaseUrl = value => {
    if (value && (!value.match('http') || !value.match('firebaseio.com'))) {
      return 'Invalid databaseURL. Copy from Firebase Auth UI.'
    }
    return undefined
  }
  