It could be a good ideia to add the following to FH3 version.
Validate field with multiple emails, separate by an ","
classValidator.php
//Validate multiple email separate by ","
function IsMEmail($value)
{
$output = 1;
$Memail = explode(",", $value);
foreach($Memail as $key){
$email = trim($key);
$output = $output & $this->IsEmail($email);
if(!$output) break;
}
return $output;
}
function _IsMEmail($value)
{
return StrLen($value) == 0 || Validator::IsMEmail($value);
}
//Validate multiple email host separate by ","
function IsMEmailHost($value)
{
$output = 1;
$Memail = explode(",", $value);
foreach($Memail as $key){
$email = trim($key);
$output = $output & $this->IsEmailHost($email);
if(!$output) break;
}
return $output;
}
function _IsMEmailHost($value)
{
return StrLen($value) == 0 || Validator::IsMEmailHost($value);
}
classFormHandler.php
define('FH_MEMAIL', 'IsMEmail', true); // a valid email address list (only checks for valid format: <a href='mailto:xxx@xxx.xxx'>xxx@xxx.xxx</a>,xxx@xxx.xxx,xxx@xxx.xxx,......)
define('FH_MEMAIL_HOST','IsMEmailHost',true); // a valid email address list with host check (only checks for valid format: <a href='mailto:xxx@xxx.xxx'>xxx@xxx.xxx</a>,xxx@xxx.xxx,xxx@xxx.xxx,......)