aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet-uk-councils/js.js3
-rw-r--r--web/cobrands/fixmystreet.com/js.js3
-rw-r--r--web/js/fixmystreet.js4
3 files changed, 6 insertions, 4 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 );
diff --git a/web/cobrands/fixmystreet.com/js.js b/web/cobrands/fixmystreet.com/js.js
new file mode 100644
index 000000000..3abba8e33
--- /dev/null
+++ b/web/cobrands/fixmystreet.com/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 );
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index c8f1fe697..78372d68c 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -49,10 +49,6 @@ $(function(){
jQuery.validator.addMethod('validCategory', function(value, element) {
return this.optional(element) || value != '-- Pick a category --'; }, translation_strings.category );
- 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 );
-
var form_submitted = 0;
var submitted = false;