From 76f000056512d323febeb6c941e43efb438030ba Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Tue, 19 Jan 2016 12:39:51 -0800 Subject: Removed extraneous error when providing a short username --- web/react/utils/utils.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react/utils/utils.jsx') 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 -- cgit v1.2.3-1-g7c22