Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix: Email Validator vs IDN #7208

Closed
wants to merge 6 commits into from
Closed

Fix: Email Validator vs IDN #7208

wants to merge 6 commits into from

Conversation

svyatoslav-kubakh
Copy link

Non-latin emails validation

@moderndeveloperllc
Copy link
Contributor

I don't think you can use idn_to_ascii() in this class as Zend\Validator does not require the intl extension to be present. If you want to validate non-Latin emails, it might be better to write an Zend\I18n validator that uses that function. Thoughts @DASPRiD?

@weierophinney
Copy link
Member

Two potential options:

  • Have it use idn_to_ascii, but only if ext/intl is installed. This could be achieved via a method call:
$this->getLocalizedLocalPart();

private function getLocalizedLocalPart()
{
    if (extension_loaded('intl')) {
        return idn_to_ascii($this->localPart);
    }
    return $this->localPart;
}
  • or move it into the Zend\I18n\Validator namespace.

Your pick. If you can do this by 9 March 2015, I can include it in 2.4.

@moderndeveloperllc
Copy link
Contributor

@svyatoslav-kubakh I can do the change and move if you don't want to deal with it.

@svyatoslav-kubakh
Copy link
Author

Hello, everyone. I apologize for my absence. Thank you for your help and advice. I will make a second attempt to fix within 1-2 days. If the patch is rejected again, you give in turn. :-)

@svyatoslav-kubakh svyatoslav-kubakh deleted the email-validator branch February 28, 2015 16:18
@moderndeveloperllc
Copy link
Contributor

@svyatoslav-kubakh We're your fixes made on another PR, or have you decided not to fix this?

@svyatoslav-kubakh
Copy link
Author

That's correct. #7281

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants