PHPackages                             imelgrat/barcode-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. imelgrat/barcode-validator

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

imelgrat/barcode-validator
==========================

A PHP class for validating EAN, IMEI, ISBN, GTIN, SSCC, GSIN, UPC and other barcodes.

v1.1.3(5y ago)2188.1k↓16.9%15[2 issues](https://github.com/imelgrat/barcode-validator/issues)MITPHPPHP &gt;=5.3.0

Since Feb 25Pushed 3y ago3 watchersCompare

[ Source](https://github.com/imelgrat/barcode-validator)[ Packagist](https://packagist.org/packages/imelgrat/barcode-validator)[ Docs](https://github.com/imelgrat/barcode-validator)[ RSS](/packages/imelgrat-barcode-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (4)Used By (0)

BarcodeValidator
================

[](#barcodevalidator)

[![GitHub license](https://camo.githubusercontent.com/b04ec735a520bbc51cb31d11cf3d706e3d0067726faebdad383c9468554e12ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d656c677261742f626172636f64652d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/barcode-validator/blob/master/LICENSE)[![GitHub release](https://camo.githubusercontent.com/47b8af17d35c56a563b5cffa1ca782c72bb24ce12ea74f82a18dcd78a7a41e8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696d656c677261742f626172636f64652d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/barcode-validator/releases)[![Total Downloads](https://camo.githubusercontent.com/8330213eb7f09147650f6bbfc7de92eaf24d060e0d996ad69a9b59baf601a7f6/68747470733a2f2f706f7365722e707567782e6f72672f696d656c677261742f626172636f64652d76616c696461746f722f646f776e6c6f616473)](https://packagist.org/packages/imelgrat/barcode-validator)[![GitHub issues](https://camo.githubusercontent.com/415d0ec655e89e9d7666b43f444ae0d496eaa59906a1fad8e1ebfd1e3e89455c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f696d656c677261742f626172636f64652d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/barcode-validator/issues)[![GitHub stars](https://camo.githubusercontent.com/acc67c80dd9e9d715a89079831835140033e3523d3178b968c6883510033d1ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f696d656c677261742f626172636f64652d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/imelgrat/barcode-validator/stargazers)

A PHP class for validating EAN, IMEI, ISBN, GTIN, SSCC, GSIN, UPC and other similar codes.

Developed by [Ivan Melgrati](https://imelgrat.me)

Requirements
------------

[](#requirements)

- PHP &gt;= 5.3.0

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

[](#installation)

### Composer

[](#composer)

The recommended installation method is through [Composer](http://getcomposer.org/), a dependency manager for PHP. Just add `imelgrat/barcode-validator` to your project's `composer.json` file:

```
{
    "require": {
        "imelgrat/barcode-validator": "*"
    }
}
```

[More details](http://packagist.org/packages/imelgrat/barcode-validator) can be found over at [Packagist](http://packagist.org).

### Manually

[](#manually)

1. Copy `src/BarcodeValidator.php` to your codebase, perhaps to the `vendor`directory.
2. Add the `BarcodeValidator` class to your autoloader or `require` the file directly.

Feedback
--------

[](#feedback)

Please open an issue to request a feature or submit a bug report. Or even if you just want to provide some feedback, I'd love to hear. I'm also available on Twitter as [@imelgrat](https://twitter.com/imelgrat).

Contributing
------------

[](#contributing)

1. Fork it.
2. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (`git commit -am 'Added some feature'`).
4. Push to the branch (`git push origin my-new-feature`).
5. Create a new Pull Request.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~527 days

Total

3

Last Release

1949d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1771952?v=4)[Iván Melgrati](/maintainers/imelgrat)[@imelgrat](https://github.com/imelgrat)

---

Top Contributors

[![imelgrat](https://avatars.githubusercontent.com/u/1771952?v=4)](https://github.com/imelgrat "imelgrat (6 commits)")[![Amirtheahmed](https://avatars.githubusercontent.com/u/41325071?v=4)](https://github.com/Amirtheahmed "Amirtheahmed (3 commits)")

---

Tags

barcodebarcode-validationbarcode-validatorcomposercomposer-packageeanean-codeean13ean14ean8gtinimeiimei-numberisbnisbn-numberphpupcupc-aupc-evalidationeanupcgtinISBNimeiIMEI codeEAN codeUPC codeGTIN codeISBN codecode validation

### Embed Badge

![Health badge](/badges/imelgrat-barcode-validator/health.svg)

```
[![Health](https://phpackages.com/badges/imelgrat-barcode-validator/health.svg)](https://phpackages.com/packages/imelgrat-barcode-validator)
```

###  Alternatives

[intervention/validation

Additional validation rules for the Laravel framework

6826.7M8](/packages/intervention-validation)[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8013.3M23](/packages/ronanguilloux-isocodes)[picqer/php-barcode-generator

An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.

1.8k25.5M88](/packages/picqer-php-barcode-generator)[biblys/isbn

A PHP library to convert and validate ISBNs

56346.8k1](/packages/biblys-isbn)[real-digital/gtin-validator

Real GTIN Validator

17414.3k1](/packages/real-digital-gtin-validator)[mvdnbrk/gtin

GTIN / EAN / UPC Validation for Laravel

3148.6k1](/packages/mvdnbrk-gtin)

PHPackages © 2026

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