diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt index 6d27ad3cda..4cb04ef5d7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt @@ -9,8 +9,8 @@ alert(_("Passwords do not match")); return false; } else { - if ($("input[name='newpassword']").val().match(/^\s*$/)) { - alert(_("Password contains nothing except whitespace")); + if ($("input[name='newpassword']").val().match(/^\s/) || $("input[name='newpassword']").val().match(/\s$/)) { + alert(_("Password contains leading and/or trailing spaces.")); return false; } else { return true;