Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/utils/reduxFormUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions translations/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down