diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2016-01-19 12:39:51 -0800 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2016-01-20 08:43:14 -0800 |
commit | 76f000056512d323febeb6c941e43efb438030ba (patch) | |
tree | 266013b0d9521f0f9103f31cdd38dbe67136da3a /web/react/utils/utils.jsx | |
parent | 1acd38b7b19521d06d274c42c00ce7072cd92196 (diff) | |
download | chat-76f000056512d323febeb6c941e43efb438030ba.tar.gz chat-76f000056512d323febeb6c941e43efb438030ba.tar.bz2 chat-76f000056512d323febeb6c941e43efb438030ba.zip |
Removed extraneous error when providing a short username
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 24042321f..c51ae1a21 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -879,8 +879,8 @@ export function isValidUsername(name) { var error = ''; if (!name) { error = 'This field is required'; - } else if (name.length < 3 || name.length > 15) { - error = 'Must be between 3 and 15 characters'; + } else if (name.length < Constants.MIN_USERNAME_LENGTH || name.length > Constants.MAX_USERNAME_LENGTH) { + error = 'Must be between ' + Constants.MIN_USERNAME_LENGTH + ' and ' + Constants.MAX_USERNAME_LENGTH + ' characters'; } else if (!(/^[a-z0-9\.\-\_]+$/).test(name)) { error = "Must contain only letters, numbers, and the symbols '.', '-', and '_'."; } else if (!(/[a-z]/).test(name.charAt(0))) { //eslint-disable-line no-negated-condition |