mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Tweak username-should-not-be-email error message
This commit is contained in:
parent
fe49867043
commit
cdba1788e7
1 changed files with 1 additions and 1 deletions
|
@ -376,7 +376,7 @@ UserSchema.pre('save', (next) ->
|
|||
if not @allowEmailNames # for testing
|
||||
filter = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i # https://news.ycombinator.com/item?id=5763990
|
||||
if filter.test(name)
|
||||
return next(new errors.UnprocessableEntity('Name may not be an email'))
|
||||
return next(new errors.UnprocessableEntity('Username may not be an email'))
|
||||
|
||||
@set('nameLower', name.toLowerCase())
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue