Tuesday, 2 October 2012

validation expression for indian mobile number in asp.net


Follow this type.....its working exactly.

<asp:TextBox ID="txtContactNumber" runat="server" Width="98%" ></asp:TextBox>  
             <asp:RegularExpressionValidator ID="revContactNumber" runat="server"
                            ControlToValidate="txtContactNumber" ErrorMessage="InValid"
                                        ValidationExpression="^[+]?\d{9,12}$">     </asp:RegularExpressionValidator>

3 comments: