aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-02-01 14:37:35 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-02-06 16:53:25 +0000
commit3e201f8d48554ab8c4b8132eaa50b5fe7dd1d67e (patch)
tree7b943b171bfbcdd74444d5a938291c69218ea027 /web/cobrands
parent35445b8cc7ae02acdfbfc3e2e9da15b022736906 (diff)
Add length/common password checking.
Diffstat (limited to 'web/cobrands')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index a3ac5b71a..0aa01e483 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -285,6 +285,9 @@ $.extend(fixmystreet.set_up, {
if (jQuery.validator) {
jQuery.validator.addMethod('validCategory', function(value, element) {
return this.optional(element) || value != '-- Pick a category --'; }, translation_strings.category );
+ jQuery.validator.addMethod('js-password-validate', function(value, element) {
+ return !value || value.length >= fixmystreet.password_minimum_length;
+ }, translation_strings.password_register.short);
}
var submitted = false;