Credit Card Validator

Page 1 of 1

2 Replies - 439 Views - Last Post: 03 September 2012 - 05:19 AM

#1 07ozo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 03-September 12

Credit Card Validator

Posted 03 September 2012 - 03:39 AM

Create a page which allows a user to enter a credit card number and expiry date into a text field. When the user clicks a button, the page should check if the credit card number and expiry date is valid. A valid credit card number has 16 digits. A expiry date is valid if it has a 2 digit month followed by a 2 digit year. The month must be between 01 and 12 and the month and year must be greater than now.

Hint:
var d = new Date();
alert(d.getFullYear()); //displays 2012
alert(d.getMonth()); //displays the month number where january is 0 and december is 11


please anyone help me??

Is This A Good Question/Topic? 0
  • +

Replies To: Credit Card Validator

#2 Mina-no-Hime  Icon User is offline

  • D.I.C Head

Reputation: 98
  • View blog
  • Posts: 176
  • Joined: 23-August 12

Re: Credit Card Validator

Posted 03 September 2012 - 03:42 AM

Stop duplicating your thread and pay attention to what's being posted in your original.
Was This Post Helpful? 1
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,273
  • Joined: 27-December 08

Re: Credit Card Validator

Posted 03 September 2012 - 05:19 AM

Please avoid duplicate posting.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1