0

There's a pan card field in my rails application.Is there any plugin or script to check the valid pan card . valid pancard is nothing but existing one.

I have following script in my application.

this will validate only format of text what we have entered.

<script type="text/javascript" language="javascript">
function fnValidatePAN(Obj) {
    if (Obj == null) Obj = window.event.srcElement;
    if (Obj.value != "") {
        ObjVal = Obj.value;
        var panPat = /^([a-zA-Z]{5})(\d{4})([a-zA-Z]{1})$/;
        var code = /([C,P,H,F,A,T,B,L,J,G])/;
        var code_chk = ObjVal.substring(3,4);
        if (ObjVal.search(panPat) == -1) {
            alert("Invalid Pan No");
            Obj.focus();
            return false;
        }
        if (code.test(code_chk) == false) {
            alert("Invaild PAN Card No.");
            return false;
        }`enter code here`
    }
   }
</script>
Arpit Srivastava
  • 2,249
  • 1
  • 16
  • 28

1 Answers1

0

I don't think you can actually check whether the entered PAN Card no. exists or belongs to a particular person. Although The Govt. of India provides online verification scheme only for Authorised firms/Companies.

may be this will help you

https://www.tin-nsdl.com/pan-verify/pan-varify-index.php

Sumit Jain
  • 87
  • 9