diff --git a/app/assets/javascripts/discourse/controllers/create-account.js.es6 b/app/assets/javascripts/discourse/controllers/create-account.js.es6 index 91beec59f62..694c89d323e 100644 --- a/app/assets/javascripts/discourse/controllers/create-account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/create-account.js.es6 @@ -197,7 +197,7 @@ export default Discourse.Controller.extend(Discourse.ModalFunctionality, { } // If too long - if (this.get('accountUsername').length > 15) { + if (this.get('accountUsername').length > 20) { return Discourse.InputValidation.create({ failed: true, reason: I18n.t('user.username.too_long') diff --git a/app/assets/javascripts/discourse/templates/modal/create_account.js.handlebars b/app/assets/javascripts/discourse/templates/modal/create_account.js.handlebars index 4dfa9d191ae..54137827050 100644 --- a/app/assets/javascripts/discourse/templates/modal/create_account.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/create_account.js.handlebars @@ -30,7 +30,7 @@ - {{input value=accountUsername id="new-account-username" maxlength="15"}} + {{input value=accountUsername id="new-account-username" maxlength="20"}}  {{input-tip validation=usernameValidation}} diff --git a/test/javascripts/controllers/create_account_controller_test.js b/test/javascripts/controllers/create_account_controller_test.js index 45ca92ee8e2..8bdd59f70ff 100644 --- a/test/javascripts/controllers/create_account_controller_test.js +++ b/test/javascripts/controllers/create_account_controller_test.js @@ -10,7 +10,7 @@ test('basicUsernameValidation', function() { testInvalidUsername('', undefined); testInvalidUsername('x', I18n.t('user.username.too_short')); - testInvalidUsername('1234567890123456', I18n.t('user.username.too_long')); + testInvalidUsername('123456789012345678901', I18n.t('user.username.too_long')); var controller = controllerFor('create-account'); controller.set('accountUsername', 'porkchops');