Latest news
Home » zendframework » php zend framework email validation

php zend framework email validation

zend framework email validation

$value=array(‘smarttips@smarttips.in,test@gmail.com’);
// Validate emails
$validate = new Zend_Validate_EmailAddress();

$emails = array_unique(array_filter(array_map(‘trim’, preg_split(“/[s,]+/”, $value))));

if( empty($emails) ) {
return false;
}

foreach( $emails as $email ) {
if( !$validate->isValid($email) ) {
return false;
}
}

Leave a Reply

x

Check Also

Get core settings value in social engine

Get  core settings value in social engine Engine_Api::_()->getApi(‘settings’, ‘core’)->getFlatSetting(‘core_general.uniistatsmail’, array(”));