From 6e857fcc5006be61a3cd019442a4be18308dba7f Mon Sep 17 00:00:00 2001 From: Sergey Polischook Date: Sun, 22 Feb 2015 23:30:53 +0700 Subject: [PATCH] Fix special chapters for EmailValidator I think "/example@example.co.uk" this is not valid email address. Does I need to fix it? internal php FILTER_VALIDATE_EMAIL allows many chapters that can't be in email addresses !#$%&'*+-/=?^_`{|}~@.[] http://php.net/manual/ru/filter.filters.sanitize.php So we need more strict validation like this regx: ^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$ --- .../Component/Validator/Tests/Constraints/EmailValidatorTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php index 0361333fdc16a..370d39a45e8fc 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php @@ -91,6 +91,7 @@ public function getInvalidEmails() array('example'), array('example@'), array('example@localhost'), + array('/example@example.co.uk'), ); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy