aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm3
-rw-r--r--perllib/FixMyStreet/DB/Result/User.pm8
2 files changed, 3 insertions, 8 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/;
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm
index 95e9908c3..4ee413a58 100644
--- a/perllib/FixMyStreet/DB/Result/User.pm
+++ b/perllib/FixMyStreet/DB/Result/User.pm
@@ -84,14 +84,6 @@ sub check_for_errors {
if ( !$self->name || $self->name !~ m/\S/ ) {
$errors{name} = _('Please enter your name');
}
- elsif (length( $self->name ) < 5
- || $self->name !~ m/\s/
- || $self->name =~ m/\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i )
- {
- $errors{name} = _(
-'Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box'
- );
- }
if ( $self->email !~ /\S/ ) {
$errors{email} = _('Please enter your email');