I am doing validation for 10 digit Indian phone numbers (coding below). I am accepting digits only. What I can't seem to figure out is how to throw an error so that if the number entered begins with text or special characters and also not allow more than 12 Digits. Or either trunacte numbers to 12 digits if user enters more than 12 digits.
<asp:RegularExpressionValidator ID="phoneregularExpression" runat="server" ErrorMessage="MoreThan10" EnableClientScript="false"
ControlToValidate="txtphone" Display="Static" Text="Please enter atleast 10 digits" ValidationExpression="^([0-9\(\)\/\+ \-]*)$"></asp:RegularExpressionValidator>
Thanks In Advance.