Email Regex Validator, not allowing "."
Hey I have the following Regex Validator
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="email"
ErrorMessage="Email requires a vaild email address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
But its not allowing the follow mail e.clear@c开发者_运维技巧ompany.ie , I believe the issue is with the . before the @ symbol, but not sure how to update the regex to reflect this
Use this:
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
This is the default regular expression provided with RegularExpressionValidator. Yours expression have a ' after 8th char. It seems to be invalid.
i think its working for e.clear@company.ie. But you are not given the validation group.
精彩评论