PHPackages                             martinrichard/laravel-credit-card-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. martinrichard/laravel-credit-card-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

martinrichard/laravel-credit-card-validator
===========================================

Laravel credit card validator 2 from rap2hpoutre

0.0.7(6y ago)0654MITPHPPHP &gt;=7.2

Since Jun 3Pushed 6y agoCompare

[ Source](https://github.com/thanhpv958/laravel-credit-card-validator)[ Packagist](https://packagist.org/packages/martinrichard/laravel-credit-card-validator)[ RSS](/packages/martinrichard-laravel-credit-card-validator/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (8)Used By (0)

Laravel Credit Card Validator
=============================

[](#laravel-credit-card-validator)

![Packagist](https://camo.githubusercontent.com/a13d6b9442fd12839b3e45d14c4905d72ce0667ecada312e2923d3040050c329/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7261703268706f757472652f6c61726176656c2d6372656469742d636172642d76616c696461746f722e737667)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/2ed065371bdf7805c0f89b788390c17620831f24690ac614d17ab47596f82b31/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f7261703268706f757472652f6c61726176656c2d6372656469742d636172642d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/rap2hpoutre/laravel-credit-card-validator)[![Quality Score](https://camo.githubusercontent.com/a3d05192f04249a1bc5e7e9d4547c2f8b7cf275b963769a7ec9a0d3b7f81dadf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7261703268706f757472652f6c61726176656c2d6372656469742d636172642d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rap2hpoutre/laravel-credit-card-validator)[![SensioLabsInsight](https://camo.githubusercontent.com/1e3b3a1fdd7e01588d58f14df0459f9ba3ca67657e0ab389271fc004c76828ac/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38303163653364312d616338632d343535652d396534642d3533623364306233393931612f6d696e692e706e67)](https://insight.sensiolabs.com/projects/801ce3d1-ac8c-455e-9e4d-53b3d0b3991a)

Adds some minimal validation rules for credit card.

Install
-------

[](#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
-----

[](#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',
]);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~240 days

Recently: every ~359 days

Total

7

Last Release

2244d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.5.0

0.0.7PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23141233?v=4)[Phan Văn Thanh](/maintainers/thanhpv958)[@thanhpv958](https://github.com/thanhpv958)

---

Top Contributors

[![rap2hpoutre](https://avatars.githubusercontent.com/u/1575946?v=4)](https://github.com/rap2hpoutre "rap2hpoutre (17 commits)")[![jeromecoloma](https://avatars.githubusercontent.com/u/122153?v=4)](https://github.com/jeromecoloma "jeromecoloma (6 commits)")[![taylornotwell](https://avatars.githubusercontent.com/u/78162749?v=4)](https://github.com/taylornotwell "taylornotwell (1 commits)")[![thanhpv958](https://avatars.githubusercontent.com/u/23141233?v=4)](https://github.com/thanhpv958 "thanhpv958 (1 commits)")

---

Tags

laravelvalidatorcredit-card

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/martinrichard-laravel-credit-card-validator/health.svg)

```
[![Health](https://phpackages.com/badges/martinrichard-laravel-credit-card-validator/health.svg)](https://phpackages.com/packages/martinrichard-laravel-credit-card-validator)
```

###  Alternatives

[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.4M7](/packages/laravel-validation-rules-credit-card)[sunspikes/clamav-validator

Custom Laravel anti-virus validator for file uploads using ClamAV.

3722.1M6](/packages/sunspikes-clamav-validator)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

183530.2k](/packages/illuminatech-validation-composite)[rap2hpoutre/laravel-credit-card-validator

Laravel credit card validator

22131.0k](/packages/rap2hpoutre-laravel-credit-card-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
