aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-10-03 14:29:56 +0100
committerStruan Donald <struan@exo.org.uk>2012-10-03 14:29:56 +0100
commitfaf97483fc3bd0ced6ed9ef6764427083e9ba6a7 (patch)
tree1eb34ae81892b67ad9e804cd4fce189b7f436601 /perllib/FixMyStreet/DB/Result/Comment.pm
parent0864deac37773c8c7f9d61e0fd1742c617f1cf2b (diff)
limit comment and description length to 2000 characters for bromley
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 2ba099aec..4f155ace3 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -146,6 +146,11 @@ sub check_for_errors {
$errors{update} = _('Please enter a message')
unless $self->text =~ m/\S/;
+ if ( $self->text && $self->problem && $self->problem->council
+ && $self->problem->council eq '2482' && length($self->text) > 2000 ) {
+ $errors{update} = _('Updates are limited to 2000 characters in length. Please shorten your update');
+ }
+
return \%errors;
}