diff options
author | Struan Donald <struan@exo.org.uk> | 2012-10-03 14:29:56 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-10-03 14:29:56 +0100 |
commit | faf97483fc3bd0ced6ed9ef6764427083e9ba6a7 (patch) | |
tree | 1eb34ae81892b67ad9e804cd4fce189b7f436601 /perllib/FixMyStreet/DB/Result/Comment.pm | |
parent | 0864deac37773c8c7f9d61e0fd1742c617f1cf2b (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.pm | 5 |
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; } |