From 89717c2a779522a73f4c062e42eb387a6d1e6a61 Mon Sep 17 00:00:00 2001 From: David Lu Date: Tue, 31 May 2016 13:20:27 -0700 Subject: Added maxlength for nicknames (#3186) --- webapp/components/user_settings/user_settings_general.jsx | 1 + webapp/utils/constants.jsx | 1 + 2 files changed, 2 insertions(+) (limited to 'webapp') diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx index 6149b1630..da195d0be 100644 --- a/webapp/components/user_settings/user_settings_general.jsx +++ b/webapp/components/user_settings/user_settings_general.jsx @@ -681,6 +681,7 @@ class UserSettingsGeneralTab extends React.Component { type='text' onChange={this.updateNickname} value={this.state.nickname} + maxLength={Constants.MAX_NICKNAME_LENGTH} autoCapitalize='off' /> diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index b7ed97162..1281e320f 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -739,6 +739,7 @@ export default { MAX_TEAMNAME_LENGTH: 15, MIN_USERNAME_LENGTH: 3, MAX_USERNAME_LENGTH: 22, + MAX_NICKNAME_LENGTH: 22, MIN_PASSWORD_LENGTH: 5, MAX_PASSWORD_LENGTH: 50, MIN_TRIGGER_LENGTH: 1, -- cgit v1.2.3-1-g7c22