mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
fix: #6921, allow square brackets in usernames
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user