Skip to content

Commit 5efff47

Browse files
authored
Merge pull request #3466 from Jatin24062005/Jatin-Issue#3465
Fixing Incorrect login error message
2 parents 3dea10e + d0fbc32 commit 5efff47

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/utils/reduxFormUtils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export function validateSettings(formProps) {
6262

6363
export function validateLogin(formProps) {
6464
const errors = {};
65-
if (!formProps.email) {
66-
errors.email = i18n.t('ReduxFormUtils.errorEmptyEmail');
65+
if (!formProps.email && !formProps.username) {
66+
errors.email = i18n.t('ReduxFormUtils.errorEmptyEmailorUserName');
6767
}
6868
if (!formProps.password) {
6969
errors.password = i18n.t('ReduxFormUtils.errorEmptyPassword');

translations/locales/en-US/translations.json

+1
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@
334334
"ReduxFormUtils": {
335335
"errorInvalidEmail": "Please enter a valid email address",
336336
"errorEmptyEmail": "Please enter an email",
337+
"errorEmptyEmailorUserName": "Please enter an email or username",
337338
"errorPasswordMismatch": "Passwords must match",
338339
"errorEmptyPassword": "Please enter a password",
339340
"errorShortPassword": "Password must be at least 6 characters",

0 commit comments

Comments
 (0)