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?
01-20-2003, 11: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!" );
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.