Commit 8746916f authored by Jordan Breton's avatar Jordan Breton

mail trim before validation

parent 4cbeab68
......@@ -12,6 +12,6 @@ final class IsEmail extends ForEachFieldRule {
* @return bool
protected function applyOn($data): bool {
return !is_null(filter_var($data,FILTER_VALIDATE_EMAIL,FILTER_NULL_ON_FAILURE));
return !is_null(filter_var(trim($data),FILTER_VALIDATE_EMAIL,FILTER_NULL_ON_FAILURE));
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment