@@ -, +, @@ well --- members/memberentry.pl | 6 +++--- opac/opac-memberentry.pl | 6 +++--- opac/opac-shareshelf.pl | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -397,13 +397,13 @@ if ($op eq 'save' || $op eq 'insert'){ my $emailalt = $input->param('B_email'); if ($emailprimary) { - push (@errors, "ERROR_bad_email") if (!Email::Valid->address($emailprimary)); + push (@errors, "ERROR_bad_email") if (!Email::Valid->address(-address => $emailprimary, -fqdn => 0)); } if ($emailsecondary) { - push (@errors, "ERROR_bad_email_secondary") if (!Email::Valid->address($emailsecondary)); + push (@errors, "ERROR_bad_email_secondary") if (!Email::Valid->address(-address => $emailsecondary, fqdn => 0)); } if ($emailalt) { - push (@errors, "ERROR_bad_email_alternative") if (!Email::Valid->address($emailalt)); + push (@errors, "ERROR_bad_email_alternative") if (!Email::Valid->address(-address => $emailalt, fqdn => 0)); } if (C4::Context->preference('ExtendedPatronAttributes') and $input->param('setting_extended_patron_attributes')) { --- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -440,7 +440,7 @@ sub CheckForInvalidFields { my $borrower = shift; my @invalidFields; if ($borrower->{'email'}) { - unless ( Email::Valid->address($borrower->{'email'}) ) { + unless ( Email::Valid->address(-address => $borrower->{'email'}, fqdn => 0) ) { push(@invalidFields, "email"); } elsif ( C4::Context->preference("PatronSelfRegistrationEmailMustBeUnique") ) { my $patrons_with_same_email = Koha::Patrons->search( # FIXME Should be search_limited? @@ -466,10 +466,10 @@ sub CheckForInvalidFields { delete $borrower->{'repeat_email'}; } if ($borrower->{'emailpro'}) { - push(@invalidFields, "emailpro") if (!Email::Valid->address($borrower->{'emailpro'})); + push(@invalidFields, "emailpro") if (!Email::Valid->address(-address => $borrower->{'emailpro'}, fqdn => 0)); } if ($borrower->{'B_email'}) { - push(@invalidFields, "B_email") if (!Email::Valid->address($borrower->{'B_email'})); + push(@invalidFields, "B_email") if (!Email::Valid->address(-address => $borrower->{'B_email'}, fqdn => 0)); } if ( defined $borrower->{'password'} and $borrower->{'password'} ne $borrower->{'password2'} ) --- a/opac/opac-shareshelf.pl +++ a/opac/opac-shareshelf.pl @@ -300,7 +300,7 @@ sub load_template_vars { sub IsEmailAddress { #TODO candidate for a module? - return Email::Valid->address( $_[0] ) ? 1 : 0; + return Email::Valid->address( -address => $_[0], -fqdn => 0 ) ? 1 : 0; } sub randomlist { --