How to check PAN Card Validation using jQuery

How to check PAN Card Validation using jQuery

function check_pan(Pan) {
    var txtPANCard = Pan;
    var regex = /([A-Z]){5}([0-9]){4}([A-Z]){1}$/;
    if (txtPANCard.length == 10) {
        if (txtPANCard.match(regex)) {
            return "Valid Pan Number";
        } else {
            return "InValid Pan Number";
        }
    } else {
        return "Enter Valid Pan Number";
    }
};

console.log(check_pan('Enter Here Your Pan Number'));

2020-03-16