protected function validator($varInput)
{
if (is_array($varInput)) {
return parent::validator($varInput);
}
// Convert to Punycode format (see #5571)
if ($this->rgxp == 'url') {
$varInput = \Idna::encodeUrl($varInput);
} elseif ($this->rgxp == 'email' || $this->rgxp == 'friendly') {
$varInput = \Idna::encodeEmail($varInput);
}
return parent::validator($varInput);
}