From 625752ced700b6be22452d6d7815d433a789197c Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Wed, 31 Jul 2013 08:32:05 +0400 Subject: [PATCH] Modified EmailValidator add links to rfc specifications. --- validator/EmailValidator.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/validator/EmailValidator.php b/validator/EmailValidator.php index 78c0731..7c7c565 100644 --- a/validator/EmailValidator.php +++ b/validator/EmailValidator.php @@ -9,7 +9,12 @@ class EmailValidator extends RegexValidator { - protected $regex = '/^([a-z0-9._-]{2,23})\@([a-z0-9-]{2,22}\.)+\w{2,5}$/i'; + /** + * @var string + * https://tools.ietf.org/html/rfc5322#section-3.4.1 + * https://tools.ietf.org/html/rfc5321#section-4.5.3 + */ + protected $regex = '/^([a-z0-9._-]{1,64})\@([a-z0-9-]{2,250}\.)+\w{2,5}$/i'; public function __construct(){} } \ No newline at end of file