In an HTML DOC I reported for a textbox the following validation code:
<asp:RegularExpressionValidator ID="revPhone" runat="server"
CssClass="validator" Display="Dynamic" ErrorMessage="Phone number"
ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}?|(\d{6.9})?"
ControlToValidate="txtPhone" >Use this format: 999-999-9999 or 999999 0r 999999999
</asp:RegularExpressionValidator><br />
I would like to understand if this regular expression:
ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}?|(\d{6.9})?"
is correct to be able to enter one of the following values:
234-456-7890
234567
234567890
Because it returns me the error message if I enter:
234567890