diff options
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 5 |
2 files changed, 10 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; } diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 7535646ab..376190aff 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -417,6 +417,11 @@ sub check_for_errors { $self->category(undef); } + if ( $self->council && $self->detail && + $self->council eq '2482' && length($self->detail) > 2000 ) { + $errors{detail} = _('Reports are limited to 2000 characters in length. Please shorten your report'); + } + return \%errors; } |