I'm assuming you're talking about the registration form. It is located in Modules/CustomerRegister.ascx. The EmailRegularExpression is set to default as:
[\w\.-]+(\+[\w-]*)?@([\w-]+\.)+[\w-]+
If you want to add any literal symbols, add them inside the square brackets [].
Example:
[\w\.-"]+(\+[\w-"]*)?@([\w-]+\.)+[\w-]+
I added the quotes for you. Try this example regular expression to see if it works. I didn't add the quotes to the domain name because I can't see why a domain name would have a quote.
The problem was that 3 regular expressions are used to valid email.
The first in EmailTextBox.ascx with the expression : ".+@.+\..+"
The second in CustomerInfo.ascx and CustomerRegister.ascx (3 times) with the expression : "[\w\.-]+(\+[\w-]*)?@([\w-]+\.)+[\w-]+"
The third in the CommonHelper class in NopSolutions.NopCommerce.Common.Utils namespace with the following expression : "^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
I decided to replace all them (except EmailTextBox.ascx) with the validation expression shipped in standard with Visual Studio 2008 to check internet addresses : "\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
Regards
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.