PHPackages                             metro-markets/gtin-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. metro-markets/gtin-validator

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

metro-markets/gtin-validator
============================

Fork of Real GTIN Validator

1.2.0(6y ago)010.4k2Apache-2.0PHPPHP ^7.1

Since May 24Pushed 6y agoCompare

[ Source](https://github.com/METRO-Markets/gtin-validator)[ Packagist](https://packagist.org/packages/metro-markets/gtin-validator)[ RSS](/packages/metro-markets-gtin-validator/feed)WikiDiscussions master Synced yesterday

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

Real GTIN Validator
===================

[](#real-gtin-validator)

[![Latest Stable Version](https://camo.githubusercontent.com/4fd7faa9a69ffce874245c4632bea211bd1d55be39207229e1d956197a79b36b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265616c2d6469676974616c2f6774696e2d76616c696461746f722e737667)](https://packagist.org/packages/real-digital/gtin-validator)[![Build Status](https://camo.githubusercontent.com/2641176426c483e7b73e8b1fd836e9253c7d1ef31b44f70726f27c00aadfcbfe/68747470733a2f2f7472617669732d63692e6f72672f7265616c2d6469676974616c2f6774696e2d76616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/real-digital/gtin-validator)[![Coverage Status](https://camo.githubusercontent.com/3321571cf058b29cfea6556bb9548be388098f1cc3df3c594b97b26940d2c2a3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7265616c2d6469676974616c2f6774696e2d76616c696461746f722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/real-digital/gtin-validator?branch=master)

A GTIN is a string of digits that uniquely identifies a trade item (a product that is bought and sold). A GTIN is globally unique, meaning that no two products in the world share the same GTIN.

This library provides a straightforward way by which a number can be determined to be a valid GTIN or suspected of being invalid in some way.

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

[](#installation)

via Composer

```
$ composer require metro-markets/gtin-validator
```

via GitHub

```
$ git clone https://github.com/metro-markets/gtin-validator.git
```

### Usage

[](#usage)

```
