Skip to content

A JavaScript-based Credit Card Validator that uses Luhn's algorithm and regular expressions to verify the validity of credit card numbers.

Notifications You must be signed in to change notification settings

iasminmartins/Credit-Card-Validator-DIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Credit Card Number Validator

This project, from Digital Innovation One, contains a JavaScript file index.js that serves as a credit card number validator. The script is capable of identifying and validating various credit card types based on their number patterns. The purpose of this validator is to ensure the authenticity of credit card numbers before processing transactions. Potential use cases include e-commerce websites, payment gateways, and any application that requires credit card validation to prevent fraudulent activities.

Supported Credit Card Types

  • Visa
  • MasterCard
  • American Express
  • Discover
  • Diners Club
  • JCB
  • Voyager
  • Aura
  • Elo
  • HiperCard
  • EnRoute

Features

  • Validates credit card numbers using the Luhn algorithm.
  • Identifies the type of credit card based on the number prefix, using regular expressions (regex).
  • Provides feedback on whether the credit card number is valid or invalid.

About

A JavaScript-based Credit Card Validator that uses Luhn's algorithm and regular expressions to verify the validity of credit card numbers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published