aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm19
-rw-r--r--perllib/FixMyStreet/Cobrand/FixMyStreet.pm3
2 files changed, 19 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index 1b437b2c5..055e481d9 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -358,5 +358,24 @@ sub lookup_site_code_config { {
}
} }
+sub extra_contact_validation {
+ my $self = shift;
+ my $c = shift;
+
+ # Don't care about dest unless reporting abuse
+ return () unless $c->stash->{problem};
+
+ my %errors;
+
+ $c->stash->{dest} = $c->get_param('dest');
+
+ if (!$c->get_param('dest')) {
+ $errors{dest} = "Please enter a topic of your message";
+ } elsif ( $c->get_param('dest') eq 'council' || $c->get_param('dest') eq 'update' ) {
+ $errors{not_for_us} = 1;
+ }
+
+ return %errors;
+}
1;
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
index b2fc5ba83..fb454f495 100644
--- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
+++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm
@@ -52,9 +52,6 @@ sub extra_contact_validation {
my $self = shift;
my $c = shift;
- # Don't care about dest if reporting abuse
- return () if $c->stash->{problem};
-
my %errors;
$c->stash->{dest} = $c->get_param('dest');