Skip to content

Commit

Permalink
Updated email validation
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Oct 3, 2024
1 parent 7a12263 commit 91c20c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Validation/PayloadValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ public function runValidator($tag, $property, $value, $options)
}
break;
case 'email':
if(!filter_var($value, FILTER_VALIDATE_EMAIL))
$eml = filter_var($value, FILTER_SANITIZE_EMAIL);
if(!$eml || !filter_var($eml, FILTER_VALIDATE_EMAIL))
{
$msg = "is not a valid email address";
}
Expand Down

0 comments on commit 91c20c2

Please sign in to comment.