Skip to content

Commit 1cb8390

Browse files
Merge pull request #740 from Ensembl/add_name_field_validation
Add name field validation
2 parents eaab96c + 20796cb commit 1cb8390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

users/modules/EnsEMBL/Users/Component/Account.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ sub add_user_details_fields {
122122
my @lists = $params->{'no_list'} ? () : @{$self->hub->species_defs->SUBSCRIPTION_EMAIL_LISTS};
123123
my $countries = $self->object->list_of_countries;
124124

125-
$form->add_field({'label' => 'Name', 'name' => 'name', 'type' => 'string', 'value' => $params->{'name'} || '', 'required' => 1 });
125+
$form->add_field({'label' => 'Name', 'name' => 'name', 'type' => 'name', 'value' => $params->{'name'} || '', 'required' => 1 });
126126
$form->add_field({'label' => 'Email Address', 'name' => 'email', 'type' => 'email', 'value' => $params->{'email'} || '', 'required' => 1, $params->{'email_notes'} ? ('notes' => $params->{'email_notes'}) : () }) unless $params->{'no_email'};
127127
$form->add_field({'label' => 'Organisation', 'name' => 'organisation', 'type' => 'string' , 'value' => $params->{'organisation'} || '' });
128128
$form->add_field({'label' => 'Country', 'name' => 'country', 'type' => 'dropdown', 'value' => $params->{'country'} || '', 'values' => [ {'value' => '', 'caption' => ''}, sort {$a->{'caption'} cmp $b->{'caption'}} map {'value' => $_, 'caption' => $countries->{$_}}, keys %$countries ] });

0 commit comments

Comments
 (0)