-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Email address regular expression is wrong everywhere. #3718
Comments
That expression doesn't look right to me. I think a \ just needs adding before the last . to match an actual . and not any character.
The 15 for the length of the top level domain could possibly be made be bigger. The maximum they can be is 63 I believe, although there are none that long at the moment. |
I think the ideal would be to use the filter php, ex .: |
@prhost can not use filters as its an external php extension that is not instsalled on all hosts. |
@danielkerr Native since PHP 5.2, are you supporting lower versions? http://php.net/manual/en/function.filter-var.php |
Yeah, i think we should use filter_var since it's already a built-in function of PHP (I don't think there's any people still using PHP < 5.2 |
im sure i added this before and got loads of complaints. |
i would be happy to use this as long as it is not a extension that some hosts dont install. |
ok if this is installed as part of php then it should put that email validation headache to bed once and for all |
The email address validation in all opencart forms is wrong. There is sily mistake in regular expression given in statement.
If I add email address xyz@abc the email address will be validated. The pattern should match email address like xyz@abc.com for that the actual expression should be as below.
/^[^\@]+@.*.[a-z]{2,15}+.[a-z]{2,4}$/i
The text was updated successfully, but these errors were encountered: