summaryrefslogtreecommitdiff
path: root/Postman/PostmanUtils.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/PostmanUtils.php')
-rw-r--r--Postman/PostmanUtils.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Postman/PostmanUtils.php b/Postman/PostmanUtils.php
index 335d0f3..6f628ec 100644
--- a/Postman/PostmanUtils.php
+++ b/Postman/PostmanUtils.php
@@ -345,6 +345,15 @@ class PostmanUtils {
if ( ! isset( PostmanUtils::$emailValidator ) ) {
PostmanUtils::$emailValidator = new Postman_Zend_Validate_EmailAddress();
}
+ if ( strpos( $email, ',' ) !== false ) {
+ $emails = explode(',', $email);
+ $result = [];
+ foreach ( $emails as $email ) {
+ $result[] = PostmanUtils::$emailValidator->isValid( $email );
+ }
+
+ return ! in_array(false, $result );
+ }
return PostmanUtils::$emailValidator->isValid( $email );
}