fix: #6921, allow square brackets in usernames

This commit is contained in:
Julian Lam
2018-11-07 16:01:22 -05:00
parent 64b9dabff8
commit da10ca084b
2 changed files with 9 additions and 3 deletions

View File

@@ -51,10 +51,16 @@ describe('Utility Methods', function () {
var username = "John\"'-. Doeäâèéë1234";
assert(utils.isUserNameValid(username), 'invalid username');
});
it('rejects empty string', function () {
var username = '';
assert.equal(utils.isUserNameValid(username), false, 'accepted as valid username');
});
it('accepts square brackets', function () {
var username = '[best clan] julian';
assert(utils.isUserNameValid(username), 'invalid username');
});
});
describe('email validation', function () {