Skip to content

Commit 411ff89

Browse files
authored
Merge pull request #2597 from lindapaiste/fix/form-errors
Fix #2499 - typo in error "please enter a email"
2 parents 4fe6349 + 6cbe21f commit 411ff89

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

client/modules/User/components/AccountForm.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import { updateSettings, initiateVerification } from '../actions';
88
import apiClient from '../../../utils/apiClient';
99

1010
function asyncValidate(fieldToValidate, value) {
11-
if (!value || value.trim().length === 0)
12-
return `Please enter a ${fieldToValidate}.`;
11+
if (!value || value.trim().length === 0) {
12+
return '';
13+
}
1314
const queryParams = {};
1415
queryParams[fieldToValidate] = value;
1516
queryParams.check_type = fieldToValidate;

client/modules/User/components/SignupForm.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import Button from '../../../common/Button';
88
import apiClient from '../../../utils/apiClient';
99

1010
function asyncValidate(fieldToValidate, value) {
11-
if (!value || value.trim().length === 0)
12-
return `Please enter a ${fieldToValidate}.`;
11+
if (!value || value.trim().length === 0) {
12+
return '';
13+
}
1314
const queryParams = {};
1415
queryParams[fieldToValidate] = value;
1516
queryParams.check_type = fieldToValidate;

0 commit comments

Comments
 (0)