function getErrorText()

in src/components/Auth/UserFormDialog/controls/EmailPassword.tsx [32:48]


function getErrorText(errors: any) {
  if (errors.email) {
    if (errors.email.type === 'pattern') {
      return 'Invalid email';
    }
    if (errors.email.type === 'validate') {
      return 'User with this email already exists';
    }
  }

  if (errors.emailpassword) {
    return 'Both email and password should be present';
  }
  if (errors.password) {
    return `Password should be at least ${PASSWORD_MIN_LENGTH} characters`;
  }
}