If you mean just check if 3 or 4 numbers where entered then it can be done very easy in JS. Just few lines of code
But if you mean CVV checking if it is valid for a given card , then it is not possible. I t is being checked at banking side.
Credit card processing, online check/ACH and EuroDebit payment solutions for the Internet merchants www.psbill.com