Use Email::Valid to check email address

master
Daniel Berteaud 10 years ago
parent 27337d4875
commit 897fd7b02f
  1. 6
      vroom.pl

@ -17,6 +17,7 @@ use File::Basename;
use Etherpad::API;
use Session::Token;
use Config::Simple;
use Email::Valid;
use Data::Dumper;
app->log->level('info');
@ -120,10 +121,7 @@ helper valid_id => sub {
helper valid_email => sub {
my $self = shift;
my ($email) = @_;
if ($email !~ m/^\S+@\S+\.\S+$/){
return 0;
}
return 1;
return Email::Valid->address($email);
};
##########################

Loading…
Cancel
Save