New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

selay/laravel-credit-card-validator

Laravel credit card validator
4,852
Install
composer require selay/laravel-credit-card-validator
Latest Version:v2.0
PHP:^7.0
Laravel:5 – 8
License:MIT
Last Updated:Jun 9, 2021
Links: GitHub  ·  Packagist
Maintainer: selay

Laravel Credit Card Validator

Adds some minimal validation rules for credit card.

This fork from original author rap2hpoutre/laravel-credit-card-validator is to support php 7.4 as there are issues

Install

Install via composer

composer require selay/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',
]);

Related Packages

rap2hpoutre/laravel-credit-card-validator

Laravel credit card validator

133,871 21
betalabs/laravel-credit-card-validator

Laravel credit card validator

20,055 0
laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2,581,005 246
rafaellimareis/credit-card

Validate credit card number, expiration date, cvc

2,220 0

Version History

Version Released PHP Laravel License
v2.0 ^7.0 5.* || ^6.0 || ^7.0 || ^8.0 MIT
v1.0.1 ^7.0 5.* || ^6.0 || ^7.0 || ^8.0 MIT
v1.0.0 ^7.0 5.* || ^6.0 || ^7.0 || ^8.0 MIT
v0.0.6 >=5.5.0 5.* MIT
v0.0.5 >=5.5.0 5.* MIT