I'm using JSN Uniform plugin for Joomla to receive emails, but it's not accepting the .company domain as a valid domain. It accepts the usual domains (com, net, org, info, biz,...), but domains like .company aren't accepted.
Now, I'm really not experienced in PHP, as I'm more into JavaScript, but according to my poor knowledge the solution to my problem could be in the form.php file so here is the part of a code.
PHP:
private function _fieldEmail($post, $fieldIdentifier, $fieldTitle, &$validationForm)
{
$postFieldIdentifier = isset($post[$fieldIdentifier]) ? $post[$fieldIdentifier] : '';
$postFieldIdentifier = (get_magic_quotes_gpc() == true || get_magic_quotes_runtime() == true) ? stripslashes($postFieldIdentifier) : $postFieldIdentifier;
$postEmail = $postFieldIdentifier;
if ($postEmail)
{
$regex = '/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,6})$/';
if (!preg_match($regex, $postEmail))
{
$validationForm[$fieldIdentifier] = JText::sprintf('JSN_UNIFORM_FIELD_EMAIL', $fieldTitle);
}
else
{
return $postFieldIdentifier ? $postFieldIdentifier : "";
}
}
else
{
return $postFieldIdentifier ? $postFieldIdentifier : "";
}
}
Could someone help me please with this?
Thanks.
EDIT: I have tried to change regex value from 2,6 to 2, but still no change.
Please see php fiddler here: http://viper-7.com/CqxAMZ