warn that a password is too short before doing anything else
This commit is contained in:
parent
a0b3201df3
commit
499b5ea2ba
@ -115,6 +115,15 @@ define([
|
|||||||
var doesAccept = $checkAcceptTerms[0].checked;
|
var doesAccept = $checkAcceptTerms[0].checked;
|
||||||
|
|
||||||
/* basic validation */
|
/* basic validation */
|
||||||
|
if (!Cred.isLongEnoughPassword(passwd)) {
|
||||||
|
var warning = Messages._getKey('register_passwordTooShort', [
|
||||||
|
Cred.MINIMUM_PASSWORD_LENGTH
|
||||||
|
]);
|
||||||
|
return void Cryptpad.alert(warning, function () {
|
||||||
|
registering = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (passwd !== confirmPassword) { // do their passwords match?
|
if (passwd !== confirmPassword) { // do their passwords match?
|
||||||
return void Cryptpad.alert(Messages.register_passwordsDontMatch);
|
return void Cryptpad.alert(Messages.register_passwordsDontMatch);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user