mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
parent
5528423636
commit
32d1076d35
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
Ghost.Validate._errors = [];
|
Ghost.Validate._errors = [];
|
||||||
Ghost.Validate.check(email).isEmail();
|
Ghost.Validate.check(email).isEmail();
|
||||||
Ghost.Validate.check(password, "Password too short").len(5);
|
Ghost.Validate.check(password, "Please enter a password").len(0);
|
||||||
|
|
||||||
if (Ghost.Validate._errors.length > 0) {
|
if (Ghost.Validate._errors.length > 0) {
|
||||||
Ghost.Validate.handleErrors();
|
Ghost.Validate.handleErrors();
|
||||||
@ -79,7 +79,7 @@
|
|||||||
Ghost.Validate._errors = [];
|
Ghost.Validate._errors = [];
|
||||||
Ghost.Validate.check(name, "Please enter a name").len(1);
|
Ghost.Validate.check(name, "Please enter a name").len(1);
|
||||||
Ghost.Validate.check(email, "Please enter a correct email address").isEmail();
|
Ghost.Validate.check(email, "Please enter a correct email address").isEmail();
|
||||||
Ghost.Validate.check(password, "Please enter a password").len(5);
|
Ghost.Validate.check(password, "Your password is not long enough. It must be at least 8 characters long.").len(8);
|
||||||
|
|
||||||
if (Ghost.Validate._errors.length > 0) {
|
if (Ghost.Validate._errors.length > 0) {
|
||||||
Ghost.Validate.handleErrors();
|
Ghost.Validate.handleErrors();
|
||||||
|
@ -14,7 +14,7 @@ var User,
|
|||||||
|
|
||||||
function validatePasswordLength(password) {
|
function validatePasswordLength(password) {
|
||||||
try {
|
try {
|
||||||
GhostBookshelf.validator.check(password, "Your password is not long enough. It must be at least 8 chars long.").len(8);
|
GhostBookshelf.validator.check(password, "Your password is not long enough. It must be at least 8 characters long.").len(8);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return when.reject(error);
|
return when.reject(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user