From 32d1076d3549a58c4c53558e0a274e6872ae2f75 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 19 Sep 2013 08:41:04 +0100 Subject: [PATCH] Correct validation message for short passwords closes #833 --- core/client/views/login.js | 4 ++-- core/server/models/user.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/client/views/login.js b/core/client/views/login.js index f566c81bda..9cbdbce012 100644 --- a/core/client/views/login.js +++ b/core/client/views/login.js @@ -25,7 +25,7 @@ Ghost.Validate._errors = []; 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) { Ghost.Validate.handleErrors(); @@ -79,7 +79,7 @@ Ghost.Validate._errors = []; Ghost.Validate.check(name, "Please enter a name").len(1); 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) { Ghost.Validate.handleErrors(); diff --git a/core/server/models/user.js b/core/server/models/user.js index d30774ee57..f2898459de 100644 --- a/core/server/models/user.js +++ b/core/server/models/user.js @@ -14,7 +14,7 @@ var User, function validatePasswordLength(password) { 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) { return when.reject(error); }