Skip to content

Commit 7254e23

Browse files
fix: Update email validation (#4577)
1 parent 6dffc33 commit 7254e23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/register.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default class RegisterController extends Controller {
3131
.catch(reason => {
3232
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.errors[0].status === 409) {
3333
this.set('errorMessage', this.l10n.t('User already exists.'));
34+
} else if (reason?.errors[0]?.status === '422') {
35+
this.set('errorMessage', this.l10n.t('Invalid email address.'));
3436
} else {
3537
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
3638
}

0 commit comments

Comments
 (0)