Skip to content

Conversation

@sprak3000
Copy link

What?

  • Use a regexp to allow international characters throughout e-mail address. Using a regexp avoids the need to install / use any special extensions, e.g., idn_to_ascii() from the php-intl extension.
  • Add two new entries to the valid e-mail data provider -- one for an IDN character in the domain portion of the e-mail address, one for an IDN character username portion.

Checklist

  • Added unit test for added/fixed code
  • Updated the documentation
  • Scrutinizer code coverage is 100%
  • Scrutinizer code quality is as high as possible

Linked issue

#167

* Use a regexp to allow international characters throughout e-mail address.
* Update tests accordingly.
['berry+plus-sign@github.com.museum'],
['berry@githüb.com'],
['bërry@github.com']
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to add some more emailadresses to check, as well as some (much more) invalid e-mail adresses. Since this is quite a big change, you know :)

Copy link

@peter279k peter279k Jan 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like @RobQuistNL says, this validation approach is the big change because the original approach uses the native filter function to validate e-mail address. And the new change use the regular expression.

I agree with @RobQuistNL, and It should add more tests to prove the regular expression can validate e-mail address currently 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants