PHPackages                             batmage/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. batmage/credit-card-validator

ActiveLibrary

batmage/credit-card-validator
=============================

A simple credit card validator using the Luhn algorithm

1.0.0(9y ago)142MITPHP

Since Jul 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Batmage/CreditCardValidator)[ Packagist](https://packagist.org/packages/batmage/credit-card-validator)[ RSS](/packages/batmage-credit-card-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

batmage/credit-card-validator
=============================

[](#batmagecredit-card-validator)

A simple PHP module to validate credit card numbers using the Luhn algorithm (by default).

[![Build Status](https://camo.githubusercontent.com/5aa740998f2c16982fe75b0741e723d8dd679ba8512f1ac08e1de86f7875dc3b/68747470733a2f2f7472617669732d63692e6f72672f4261746d6167652f4372656469744361726456616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Batmage/CreditCardValidator) [![Latest Stable Version](https://camo.githubusercontent.com/126a81cde3230fa1560c826871f79927df85a81797f0982095db84ba8ad14c9c/68747470733a2f2f706f7365722e707567782e6f72672f6261746d6167652f6372656469742d636172642d76616c696461746f722f762f737461626c65)](https://packagist.org/packages/batmage/credit-card-validator) [![License](https://camo.githubusercontent.com/9bb7789f505e85aa80242e515456c73689fee1f2acdcb0028ad49e0e43effc14/68747470733a2f2f706f7365722e707567782e6f72672f6261746d6167652f6372656469742d636172642d76616c696461746f722f6c6963656e7365)](https://packagist.org/packages/batmage/credit-card-validator)

Installation
------------

[](#installation)

Require in your project with composer:

```
composer require batmage/credit-card-validator ^1.0
```

Usage
-----

[](#usage)

An example use:

```
$validator = new \Batmage\CreditCardValidator\Validator;
$result = $validator->validate('4111 1111 1111 1111'); // bool(true)
```

License
-------

[](#license)

MIT license. See `LICENSE.md` for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3575d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/04057079b9a8a168a9e8c40cf7bac17f05047255c48b71b63fc610db06f096cb?d=identicon)[robbieaverill](/maintainers/robbieaverill)

---

Top Contributors

[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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