Skip to content

Commit

Permalink
[add] comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bcarrell committed Dec 23, 2013
1 parent c554a88 commit da7eaec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion money.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ const (
"[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$"
)

// verifies a credit card is valid
// verifies a credit card number
// we consider a credit card to be valid if it passes the constant
// creditCardRegexp and passes the Luhn algorithm
// This method should currently verify the following card formats:
// - Visa
// - MasterCard
// - AmEx
// - Discover
// - Diners Club
// - JCB
func (v *verifier) CreditCard() *verifier {
v.Results["CreditCard"] = true
r := regexp.MustCompile("[^0-9]+")
Expand Down

0 comments on commit da7eaec

Please sign in to comment.