rap2hpoutre / laravel-credit-card-validator by rap2hpoutre

Laravel credit card validator
123,329
21
5
Package Data
Maintainer Username: rap2hpoutre
Maintainer Contact: raphaelht@gmail.com (rap2hpoutre)
Package Create Date: 2016-06-03
Package Last Update: 2020-10-27
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-14 15:07:48
Package Statistics
Total Downloads: 123,329
Monthly Downloads: 648
Daily Downloads: 55
Total Stars: 21
Total Watchers: 5
Total Forks: 13
Total Open Issues: 1

Laravel Credit Card Validator

Packagist Software License Build Status Quality Score SensioLabsInsight

Adds some minimal validation rules for credit card.

Install

Install via composer

composer require rap2hpoutre/laravel-credit-card-validator

Add Service Provider to config/app.php in providers section

Rap2hpoutre\LaravelCreditCardValidator\ServiceProvider::class,

Usage

Add this to your validation rules:

// Add this in your controller method
$this->validate($request, [
    'credit-card-number' => 'required|ccn',
    'credit-card-date' => 'required|ccd',
    'credit-validation-code' => 'required|cvc',
]);