diff --git a/client/utils/reduxFormUtils.js b/client/utils/reduxFormUtils.js index cb2d88b495..085e37cae7 100644 --- a/client/utils/reduxFormUtils.js +++ b/client/utils/reduxFormUtils.js @@ -62,8 +62,8 @@ export function validateSettings(formProps) { export function validateLogin(formProps) { const errors = {}; - if (!formProps.email) { - errors.email = i18n.t('ReduxFormUtils.errorEmptyEmail'); + if (!formProps.email && !formProps.username) { + errors.email = i18n.t('ReduxFormUtils.errorEmptyEmailorUserName'); } if (!formProps.password) { errors.password = i18n.t('ReduxFormUtils.errorEmptyPassword'); diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json index 5abbb3c3aa..59e6bcbaad 100644 --- a/translations/locales/en-US/translations.json +++ b/translations/locales/en-US/translations.json @@ -334,6 +334,7 @@ "ReduxFormUtils": { "errorInvalidEmail": "Please enter a valid email address", "errorEmptyEmail": "Please enter an email", + "errorEmptyEmailorUserName": "Please enter an email or username", "errorPasswordMismatch": "Passwords must match", "errorEmptyPassword": "Please enter a password", "errorShortPassword": "Password must be at least 6 characters",