You must Sign In to post a response.
  • Category: ASP.NET

    Regular Expression Validator for pan card Number ?

    Hi Frnds
    I need validation Expression for pan card Number,
    Plz Its Urgent

    Help me
  • #351226
    Hi ,

    A per ur requirement , Use CustomValidator Control Validation

    I am sending example , here i am only check length.....for numeric refer

    <form runat="server">
    <asp:Label runat="server" Text="" id="lbmsg" associatedcontrolid="txtpancard"/>
    <asp:TextBox id="txtpassword" runat="server" />
    <asp:Button Text="Submit" runat="server"/>
    <br />
    Text="Pancard must be atleast 10 characters!"


    <script runat="server">
    Sub password(source As object,args As ServerValidateEventArgs)

    if args.Value. > 10 then
    end if
    End Sub

    Warm Regards
    Ashish Tiwari
    'Rome was not built in a day '

  • #351227
    <asp:RegularExpressionValidator ID="reg" runat="server" Display="Static" ControlToValidate="TextBox Id"
    ErrorMessage="Please Enter Valid Pan Number"

    Hope this will help u

  • #351230
    ValidationExpression="[A-Z]{5}\d{4}[A-Z]{1}" you must place this expression in the properties of regular expression as validexpression

  • #351232
    Pan Card contains 10 character, computer generated code, having first 5 as alphabets followed by 4 numerals and ends with an alphabet again.


    Thanks for Sharing

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.