| Ratings |   | Unique User Downloads |   | Download Rankings | 
| Not enough user ratings |  | Total: 129  |  | All time:  9,378 This week: 206  | 
 | 
| 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.  |  | 
  | 
 | 
Innovation award
   Nominee: 3x |  
 
 
  | 
Example
<?php 
    /** 
     * @author Ivan Melgrati 
     * @copyright 2018 
     */ 
    require_once ('../src/barcode-validator.php'); 
 
    $code = '490154203237518'; 
    echo 'Is IMEI code "'.$code.'" valid? '. (BarcodeValidator::IsValidIMEI($code) ? 'true' : 'false'). '<br>'; 
     
    $code = '9780596100674'; 
    echo 'Is ISBN "'.$code.'" valid? '. (BarcodeValidator::IsValidISBN($code) ? 'true' : 'false'). '<br>'; 
?>
 
 | 
 
Details
BarcodeValidator

A PHP class for validating EAN, IMEI, ISBN, GTIN, SSCC, GSIN, UPC and other similar codes.
Developed by Ivan Melgrati 
Requirements
Installation
Composer
The recommended installation method is through
Composer, a dependency manager for PHP. Just add
imelgrat/barcode-validator to your project's composer.json file:
{
    "require": {
        "imelgrat/barcode-validator": "*"
    }
}
More details can
be found over at Packagist.
Manually
- 
Copy `src/barcode-validator.php` to your codebase, perhaps to the `vendor`
directory.
 
- 
Add the `BarcodeValidator` class to your autoloader or `require` the file
directly.
 
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.
Contributing
- 
Fork it.
 
- 
Create your feature branch (`git checkout -b my-new-feature`).
 
- 
Commit your changes (`git commit -am 'Added some feature'`).
 
- 
Push to the branch (`git push origin my-new-feature`).
 
- 
Create a new Pull Request.
 
 
 
|   | 
Applications that use this package | 
  | 
No pages of applications that use this class were specified.
 If you know an application of this package, send a message to the author to add a link here.