aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/fixmystreet-uk-councils/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/cobrands/fixmystreet-uk-councils/js.js')
-rw-r--r--web/cobrands/fixmystreet-uk-councils/js.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet-uk-councils/js.js b/web/cobrands/fixmystreet-uk-councils/js.js
new file mode 100644
index 000000000..3abba8e33
--- /dev/null
+++ b/web/cobrands/fixmystreet-uk-councils/js.js
@@ -0,0 +1,3 @@
+jQuery.validator.addMethod('validName', function(value, element) {
+ var validNamePat = /\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i;
+ return this.optional(element) || value.length > 5 && value.match( /\S/ ) && value.match( /\s/ ) && !value.match( validNamePat ); }, translation_strings.category );