diff options
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Buckinghamshire.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Buckinghamshire.pm | 19 |
1 files changed, 19 insertions, 0 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; |