mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Prevent email-formatted usernames on teacher signup
This commit is contained in:
parent
0b3c7d3189
commit
2f8ad4afdf
1 changed files with 3 additions and 0 deletions
|
@ -136,6 +136,9 @@ module.exports = class CreateTeacherAccountView extends RootView
|
|||
if not error and not forms.validateEmail(trialRequestAttrs.email)
|
||||
forms.setErrorToProperty(form, 'email', 'invalid email')
|
||||
error = true
|
||||
if not error and forms.validateEmail(allAttrs.name)
|
||||
forms.setErrorToProperty(form, 'name', 'username may not be an email')
|
||||
error = true
|
||||
if not _.size(trialRequestAttrs.educationLevel)
|
||||
forms.setErrorToProperty(form, 'educationLevel', 'include at least one')
|
||||
error = true
|
||||
|
|
Loading…
Reference in a new issue