PHP Barcode Validator: Validate bar codes in several formats

Recommend this page to a friend!
  Info   Example   View files (65)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 91 All time: 9,481 This week: 230
Version License PHP version Categories
code-validator 1.0.0MIT/X Consortium ...5.3PHP 5, Validation
Description Author

This package can validate bar codes in several formats.

It takes as parameter a string with a bar code in a supported format and returns a result telling of the code is valid or invalid.

Currently it supports the formats: EAN, IMEI, ISBN, GTIN, SSCC, GSIN, UPC and other similar codes.

Picture of Ivan Melgrati
  Performance   Level  
Name: Ivan Melgrati is available for providing paid consulting. Contact Ivan Melgrati .
Classes: 11 packages by
Country: Argentina Argentina
Age: 44
All time rank: 1993 in Argentina Argentina
Week rank: 762 8 in Argentina Argentina
Innovation award
Innovation award
Nominee: 3x



GitHub license GitHub release Total Downloads GitHub issues GitHub stars

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

Developed by Ivan Melgrati


  • PHP >= 5.3.0



The recommended installation method is through Composer, a dependency manager for PHP. Just add imelgrat/code-validator to your project's composer.json file:

    "require": {
        "imelgrat/code-validator": "*"

More details can be found over at Packagist.


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


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.


  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.
File Role Description
docs (2 files, 9 directories)
examples (1 file)
src (1 file)
composer.json Data Auxiliary data
LICENSE Lic. License text
phpdoc.dist.xml Data Auxiliary data Doc. Documentation
VERSION Data Auxiliary data

  Files  /  docs  
File Role Description
classes (1 file)
css (5 files, 1 directory)
files (2 files)
font (1 file)
graphs (2 files)
images (18 files, 1 directory)
js (10 files, 1 directory)
namespaces (1 file)
reports (3 files)
   .htaccess Data Auxiliary data
   index.html Doc. Documentation

  Files  /  docs  /  classes  
File Role Description
   CodeValidator.html Doc. Documentation

  Files  /  docs  /  css  
File Role Description
phpdocumentor-clean-icons (2 files, 1 directory) Data Auxiliary data
   font-awesome.min.css Data Auxiliary data
   jquery.iviewer.css Data Auxiliary data
   prism.css Data Auxiliary data
   template.css Data Auxiliary data

  Files  /  docs  /  css  /  phpdocumentor-clean-icons  
File Role Description
fonts (2 files)
   lte-ie7.js Data Auxiliary data
   style.css Data Auxiliary data

  Files  /  docs  /  css  /  phpdocumentor-clean-icons  /  fonts  
File Role Description Data Auxiliary data
   phpdocumentor-clean-icons.svg Data Auxiliary data

  Files  /  docs  /  files  
File Role Description
   code-validator.html Doc. Documentation
   code-validator.php.txt Doc. Documentation

  Files  /  docs  /  font  
File Role Description
   fontawesome-webfont.svg Data Auxiliary data

  Files  /  docs  /  graphs  
File Role Description
   class.html Doc. Documentation
   classes.svg Data Auxiliary data

  Files  /  docs  /  images  
File Role Description
iviewer (8 files)
   android-chrome-192x192.png Icon Icon image
   android-chrome-512x512.png Data Auxiliary data
   apple-touch-icon-114x114.png Icon Icon image
   apple-touch-icon-72x72.png Icon Icon image
   apple-touch-icon.png Icon Icon image
   custom-icons.svg Data Auxiliary data
   favicon-16x16.png Icon Icon image
   favicon-32x32.png Icon Icon image
   favicon.ico Data Auxiliary data
   hierarchy-item.png Icon Icon image
   icon-class-13x13.png Icon Icon image
   icon-class.svg Data Auxiliary data
   icon-interface-13x13.png Icon Icon image
   icon-interface.svg Data Auxiliary data
   icon-trait-13x13.png Icon Icon image
   icon-trait.svg Data Auxiliary data
   mstile-150x150.png Icon Icon image
   safari-pinned-tab.svg Data Auxiliary data

  Files  /  docs  /  images  /  iviewer  
File Role Description
   grab.cur Data Auxiliary data
   hand.cur Data Auxiliary data
   iviewer.rotate_left.png Icon Icon image
   iviewer.rotate_right.png Icon Icon image
   iviewer.zoom_fit.png Icon Icon image
   iviewer.zoom_in.png Icon Icon image
   iviewer.zoom_out.png Icon Icon image
   iviewer.zoom_zero.png Icon Icon image

  Files  /  docs  /  js  
File Role Description
ui (1 directory)
   bootstrap.min.js Data Auxiliary data
   html5.js Data Auxiliary data
   jquery-1.11.0.min.js Data Auxiliary data
   jquery.dotdotdot-1.5.9.js Data Auxiliary data
   jquery.dotdotdot-1.5.9.min.js Data Auxiliary data
   jquery.iviewer.js Data Auxiliary data
   jquery.iviewer.min.js Data Auxiliary data
   jquery.mousewheel.js Data Auxiliary data
   jquery.smooth-scroll.js Data Auxiliary data
   prism.min.js Data Auxiliary data

  Files  /  docs  /  js  /  ui  
File Role Description
1.10.4 (1 file)

  Files  /  docs  /  js  /  ui  /  1.10.4  
File Role Description
   jquery-ui.min.js Data Auxiliary data

  Files  /  docs  /  namespaces  
File Role Description
   default.html Doc. Documentation

  Files  /  docs  /  reports  
File Role Description
   deprecated.html Doc. Documentation
   errors.html Doc. Documentation
   markers.html Doc. Documentation

  Files  /  examples  
File Role Description
   test.php Example Class example file

  Files  /  src  
File Role Description
   code-validator.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,481
This week:230

For more information send a message to info at phpclasses dot org.