Achele / creditCard-validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Credit Card Validator

A JavaScript program for validating credit card numbers and identifying the card type (Visacard, Mastercard and Vervecard).

Overview

This JavaScript program utilizes regular expressions to validate credit card numbers and determine their corresponding types. It supports common credit card types such as Visacard, and Mastercard.

Features

Card Type Identification:

The program identifies the type of credit card (Visacard, Mastercard) based on the provided card number.

Input Flexibility:

Accepts credit card numbers with spaces or dashes and removes them for seamless validation.

Regex Patterns:

Utilizes regular expressions to ensure accurate validation.

About


Languages

Language:JavaScript 100.0%