You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, thanks for the project, it's pretty handy!
Unfortunately, because of how the isValid function is implemented this library cannot be utilized with international domains and will always report them as invalid.
Problem
This isn't really your fault, but rather due to PHP itself as FILTER_VALIDATE_EMAIL will not validate them correctly.
(If you want some valid emails to test, there's a few examples on Wikipedia)
filter_var($email, FILTER_VALIDATE_EMAIL)
Proposed Solution
Ideally, this library should provide a method to disable the built-in validation which would allow someone to use packages such as egulias/EmailValidator which is much better than PHP's implementation and will correctly validate these domains. Otherwise people will be left to implement workarounds to be able to utilize it when they also need to handle international email addresses.
Your parseEmailAddress function already appears to correctly handle them, so the only road block is just giving the option to disable validation check.
Workaround
For anyone else who runs into this limitation, you can actually pretty easily bypass things just replicating what the isValid function does.
Here's an example from my application:
I'd imagine this will work indefinitely, but since since utilized methods aren't documented in the readme, I'd assume that undocumented changes to them are fair game, hence the want for an official way to disable the validation.
The text was updated successfully, but these errors were encountered:
Hi there, thanks for the project, it's pretty handy!
Unfortunately, because of how the
isValid
function is implemented this library cannot be utilized with international domains and will always report them as invalid.Problem
This isn't really your fault, but rather due to PHP itself as
FILTER_VALIDATE_EMAIL
will not validate them correctly.(If you want some valid emails to test, there's a few examples on Wikipedia)
Proposed Solution
Ideally, this library should provide a method to disable the built-in validation which would allow someone to use packages such as
egulias/EmailValidator
which is much better than PHP's implementation and will correctly validate these domains. Otherwise people will be left to implement workarounds to be able to utilize it when they also need to handle international email addresses.Your
parseEmailAddress
function already appears to correctly handle them, so the only road block is just giving the option to disable validation check.Workaround
For anyone else who runs into this limitation, you can actually pretty easily bypass things just replicating what the
isValid
function does.Here's an example from my application:
I'd imagine this will work indefinitely, but since since utilized methods aren't documented in the readme, I'd assume that undocumented changes to them are fair game, hence the want for an official way to disable the validation.
The text was updated successfully, but these errors were encountered: