-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] Mail: allow domains as domain.edu.co #4905
Conversation
test: emails with 2 fullstops in domain work. A selection of other emails also seem to pass without any issues. |
able to reproduce then #4905 works as expected with double dotted domains AND without like contact@test thanks |
In fact this does not validate as @Domain is not accepted. See /tests/unit/suites/libraries/joomla/form/rule/JFormRuleEmailTest.php |
I corrected the helper but the validation is still wrong, I guess because of the code in:
What do you think? we have there |
The question, in fact, is: |
"Shall we authorise or not domains without a suffix?" I am not an expert but I don't see why we should not? |
It is very useful where Joomla is used on an intranet where they might use
|
If all agree, I will then revert and we just have to correct the validation to be always true in |
I think there are valid reasons why these should not validate (e.g. http://www.symantec.com/connect/blogs/important-changes-ssl-certificates-intranets-what-you-need-know) |
👍 to support domains without dots. We should not restrict email addresses more than the standards |
Let's see if test pass this time. :) |
WE still have
[email protected] should have returned false but did not Failed asserting that true matches expected false. not passing. |
…and used more specifc annotations
looked into it and have send a PR to your branch JM |
@rdeutz |
changed one condition to let the tests pass, splited one test in two
Merged Robert pull after discussion on skype |
[Fix] Mail: allow domains as domain.edu.co
@@ -55,7 +55,7 @@ public function test(SimpleXMLElement $element, $value, $group = null, JRegistry | |||
|
|||
if ($tld) | |||
{ | |||
$this->regex = '^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]{2,})$'; | |||
$this->regex = '^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both regex a same now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost but not quite - look at the final few characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Former patches did not let enter emails of type
[email protected]
(double dotted domains)This will let them saved OK.