diff options
author | Chris Mytton <self@hecticjeff.net> | 2013-09-25 11:50:26 +0100 |
---|---|---|
committer | Chris Mytton <self@hecticjeff.net> | 2013-09-25 11:50:26 +0100 |
commit | 0efb806e7dbfc6681230041751ed49552ec3ba5b (patch) | |
tree | 9bf58000568f1376b309e9aade9c0fc601637750 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | 8e5005fd26b4396443f0aac1d7bb8f05f8357bd6 (diff) | |
parent | f26fe9ff49a22eb532d4dea94158952d0bc01022 (diff) |
Merge branch 'master' into oxfordshire-usability-recommendations
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index f14a29f56..4fa442608 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -388,9 +388,14 @@ sub check_for_errors { $self->category(undef); } - if ( $self->bodies_str && $self->detail && - $self->bodies_str eq '2482' && length($self->detail) > 2000 ) { - $errors{detail} = _('Reports are limited to 2000 characters in length. Please shorten your report'); + if ( $self->bodies_str && $self->detail ) { + if ( $self->bodies_str eq '2482' && length($self->detail) > 2000 ) { + $errors{detail} = _('Reports are limited to 2000 characters in length. Please shorten your report'); + } + + if ( $self->bodies_str eq '2237' && length($self->detail) > 1700 ) { + $errors{detail} = _('Reports are limited to 1700 characters in length. Please shorten your report'); + } } return \%errors; |