Dear Friend,
You can use this simple Javascript function.
function pan_card(textObj)
{
var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/;
var code= /([C,P,H,F,A,T,B,L,J,G])/;
var code_chk=textObj.substring(3,4);
if (textObj!=="")
{
if(regpan.test(textObj) == false)
{
alert("Invaild PAN Card No.")
return false;
}
if (code.test(code_chk)==false)
{
alert("Invaild PAN Card No.");
return false;
}
}
}