Altered regex to allow '+' in email address
This commit is contained in:
parent
ba3eedf4a7
commit
a91bc9c154
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ Returns a validated email address. If the result does not pass validation, it re
|
|||
sub getValueFromPost {
|
||||
my $self = shift;
|
||||
my $value = $self->session->form->param($self->get("name"));
|
||||
if ($value =~ /^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/i) {
|
||||
if ($value =~ /^([0-9a-zA-Z]([-.+\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/i) {
|
||||
return $value;
|
||||
}
|
||||
return undef;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue