Irio / mymoip

MoIP transactions in a gem to call your own.
MIT License
31 stars 21 forks source link

Wrong validation on credit card #30

Closed zangrandi closed 11 years ago

zangrandi commented 11 years ago

The regex that is validating the expiration date of credit card is wrong, it's not accepting the month "11".

/\A(?:(?:0[1-9])|(?:1[02]))\/\d{2}\Z/

I think this would resolve the problem:

/\A(?:(?:0[1-9])|(?:1[0-2]))\/\d{2}\Z/
Irio commented 11 years ago

It's correct. Can you submit a patch fixing it?