Skip to content

Commit

Permalink
Merge pull request #428 from fatteme/master
Browse files Browse the repository at this point in the history
fix credit card regex replacement
  • Loading branch information
asaskevich committed Mar 7, 2021
2 parents 92c3457 + 815d4c0 commit 8aafe60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func IsULID(str string) bool {

// IsCreditCard checks if the string is a credit card.
func IsCreditCard(str string) bool {
sanitized := notNumberRegexp.ReplaceAllString(str, "")
sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "")
if !rxCreditCard.MatchString(sanitized) {
return false
}
Expand Down

0 comments on commit 8aafe60

Please sign in to comment.