mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
removed password length code, moved to separate PR
This commit is contained in:
parent
49fe86ae3c
commit
652871f0bd
1 changed files with 1 additions and 3 deletions
|
@ -50,9 +50,7 @@ module.exports.validateUsernameRemotely = username => (
|
|||
module.exports.validatePassword = (password, username) => {
|
||||
if (!password) {
|
||||
return {valid: false, errMsgId: 'general.required'};
|
||||
// get length of password, considering unicode symbols as single chars.
|
||||
// see discussion at https://stackoverflow.com/a/54370584/2308190
|
||||
} else if (Array.from(password).length < 6) {
|
||||
} else if (password.length < 6) {
|
||||
return {valid: false, errMsgId: 'registration.validationPasswordLength'};
|
||||
} else if (password === 'password') {
|
||||
return {valid: false, errMsgId: 'registration.validationPasswordNotEquals'};
|
||||
|
|
Loading…
Reference in a new issue