diff options
author | Ryan Wang <R-Wang97@users.noreply.github.com> | 2017-04-16 17:08:37 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-04-16 17:08:37 -0400 |
commit | c7f26bb1103e75c451eba3b720ac41097c427fbc (patch) | |
tree | 0c2b946523e7f32198dfb36570ff2ee6272653b2 /webapp/utils/utils.jsx | |
parent | d8d0716122be5eebab85b89f5a5a522fcaed3bd1 (diff) | |
download | chat-c7f26bb1103e75c451eba3b720ac41097c427fbc.tar.gz chat-c7f26bb1103e75c451eba3b720ac41097c427fbc.tar.bz2 chat-c7f26bb1103e75c451eba3b720ac41097c427fbc.zip |
Update error message when password is too long (#6001)
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r-- | webapp/utils/utils.jsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index f707e2b28..9a4f5c21f 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -1281,7 +1281,7 @@ export function isValidPassword(password) { } minimumLength = global.window.mm_config.PasswordMinimumLength; - } else if (password.length < Constants.MIN_PASSWORD_LENGTH) { + } else if (password.length < Constants.MIN_PASSWORD_LENGTH || password.length > Constants.MAX_PASSWORD_LENGTH) { error = true; } @@ -1289,9 +1289,10 @@ export function isValidPassword(password) { errorMsg = ( <FormattedMessage id={errorId} - default='Your password must be at least {min} characters.' + default='Your password must contain between {min} and {max} characters.' values={{ - min: minimumLength + min: minimumLength, + max: Constants.MAX_PASSWORD_LENGTH }} /> ); |