ContaAzul / creditcard.js

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

fix: Remove errors replace of null #127

Closed dedicio closed 3 years ago

dedicio commented 3 years ago

What is the change?

Add a validation in function findCreditCardObjectByNumber to check if number is truly value

Why make this change?

It was generating error in getCreditCardNameByNumber and isSecurityCodeValid when send card number as null or undefined

Fix: #126

Test plan

Call methods getCreditCardNameByNumber or isSecurityCodeValid with null or undefined params and returns false whitout console errors