Solved credit card validation in JS