diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-28 12:19:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-28 12:19:05 +0100 |
commit | 841cb92f5e395e77af08374affbca828f8c28c48 (patch) | |
tree | 025c012d33f96cd6a8b72cfbe4a18b73eda5adb2 /perllib/FixMyStreet/DB/Result/Comment.pm | |
parent | b3c14cc0e839fc11c1d192c46476751e5154d2d7 (diff) |
Allow people to sign in (or not) as they make an update.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 18bcedc1b..ae152eb31 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -105,6 +105,9 @@ sub check_for_errors { my %errors = (); + $errors{name} = _('Please enter your name') + if !$self->name || $self->name !~ m/\S/; + $errors{update} = _('Please enter a message') unless $self->text =~ m/\S/; |