ContaAzul / creditcard.js

A simple credit card validation library in JavaScript
http://contaazul.github.io/creditcard.js/
Other
376 stars 81 forks source link

Switch string regex to literal regex #76

Closed carlosrberto closed 6 years ago

carlosrberto commented 6 years ago

When using string regex like new RegExp('\d') the string is parsed as RegExp('d') and this will break some validations. I've experienced this issue with some Elo card validations.

fernahh commented 6 years ago

@carlosrberto I've published the new version! https://github.com/ContaAzul/creditcard.js/releases/tag/v2.1.5

It's on npm too.

Thanks! :tada:

carlosrberto commented 6 years ago

Thanks @fernahh! 👍