Validation expression for Indian mobile phone number in asp.net c#
For example:-
·
8004561000
·
9044815468
·
9450319996
·
7535154565
Use this expression in regular expression
validator
^[7-9][0-9]{9}$
Source Code
<asp:TextBox ID="txtmobileno" runat="server" Width="180px"></asp:TextBox>
<asp:RegularExpressionValidator
ID="REFmoblie"
runat="server"
ErrorMessage="Please enter valid phone no" ControlToValidate="txtmobileno"
ForeColor="Red" style="font-size: small" ValidationExpression="^[7-9][0-9]{9}$"></asp:RegularExpressionValidator>
Validation expression for Indian mobile phone number in asp.net c#
Reviewed by NEERAJ SRIVASTAVA
on
9:43:00 PM
Rating:
No comments: