Regex, React, JavaScript, Nodejs, Development.
^(?:5[1–5][0–9]{2}|222[1–9]|22[3–9][0–9]|2[3–6][0–9]{2}|27[01][0–9]|2720)[0–9]{12}$ Discover Card: ^6(?:011|5[0–9]{2})[0–9]{12}$ function isValidVisaCard(cardNumber) { if(/^4[0-9]{12}(?:[0-9]{3})?$/.test(cardNumber)) { console.log('valid visa credit card number'); } else { console.log('invalid visa