Skip to content

Commit

Permalink
Adding check to make sure username is not an email address
Browse files Browse the repository at this point in the history
  • Loading branch information
bshardi committed Feb 27, 2014
1 parent c7ce0f6 commit 398065d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/views/signUp/signUp.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ Template.entrySignUp.events
Session.set('entryError', i18n("error.usernameRequired"))
return

if username && AccountsEntry.isStringEmail(username)
Session.set('entryError', i18n("error.usernameIsEmail"))
return

if emailRequired && email.length is 0
Session.set('entryError', i18n("error.emailRequired"))
return
Expand Down

0 comments on commit 398065d

Please sign in to comment.