I am unable to register a new user in piwik if they are using one of the new domain extensions.
For example, the email: firstname.lastname@example.org
fails with error message: "The email doesn't have a valid format" through both the API and the user interface.
Maybe we could leave the existing validation https://github.com/piwik/piwik/blob/master/core/Piwik.php#L658 and in case it would return false fall back to check the domain/ip using for example
checkdnsrr? Any other ideas?
Our QA person did some edge case testing, and the current validation is super simple.
If the domain is 7 characters or less it works. 8 or more and it doesn't. Looks like a simple regex change is all that's needed. Either remove the 7 character limit, keeping the 2 character minimum, or increase 7 to whatever the longest top level domain length is, but that's likely to change, so I would choose to remove the upper character limit entirely.
I modified the regex to allow up to 15 characters in domain name but we might have to increase this soon again. Thought about this before as well but wasn't sure how accurate this method is supposed to be as it is used for validation in different places. Also not sure what the longest domain extension possibly could be. Found ".international" which was the longest so far. We could also remove the upper limit as suggested by @cemdev .
@mattab any opinion?
@tsteur @mattab We could easily simplify the email validation to a simple check for an
@ and a