View Full Version : verifying date
How do you validate a credit card expiration year and verify in comparison with the current date that the credit card expiration date is valid?
beetle
01-20-2003, 10:25 PM
In a nutshell....
var d = new Date();
var y = d.getFullYear();
if ( parseInt( document.formName.inputName.value, 10 ) < y )
alert( "Your card has expired!" );
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.