refactor validate address
This commit is contained in:
parent
38342df5cf
commit
30b83f9ada
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ qr((?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-
|
||||||
sub validate_address {
|
sub validate_address {
|
||||||
my $address = shift;
|
my $address = shift;
|
||||||
if ( $address =~ $regex_for_email ) {
|
if ( $address =~ $regex_for_email ) {
|
||||||
return 1
|
return (1,'')
|
||||||
}
|
}
|
||||||
return (0,'Invalid message')
|
return (0,'Invalid message')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue