From ee599fb46dff002f05efecc5a85a77dcd6cc5d37 Mon Sep 17 00:00:00 2001 From: John Linhart Date: Tue, 30 May 2017 20:54:57 +0200 Subject: [PATCH] Email validation messages simplified --- app/bundles/EmailBundle/Helper/MailHelper.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/bundles/EmailBundle/Helper/MailHelper.php b/app/bundles/EmailBundle/Helper/MailHelper.php index 3f469fc791a..cb22ebe1d4c 100644 --- a/app/bundles/EmailBundle/Helper/MailHelper.php +++ b/app/bundles/EmailBundle/Helper/MailHelper.php @@ -1256,15 +1256,14 @@ public static function validateEmail($address) if ($invalidChar !== false) { throw new \Swift_RfcComplianceException( - 'Address in mailbox given ['.$address. - '] contains the invalid character: '.substr($invalidChar, 0, 1) + 'Email address ['.$address. + '] contains this invalid character: '.substr($invalidChar, 0, 1) ); } if (!filter_var($address, FILTER_VALIDATE_EMAIL)) { throw new \Swift_RfcComplianceException( - 'Address in mailbox given ['.$address. - '] does not comply with RFC 882' + 'Email address ['.$address.'] is invalid' ); } }