PHPackages                             real-digital/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. real-digital/gtin-validator

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

real-digital/gtin-validator
===========================

Real GTIN Validator

1.3.0(4y ago)17414.3k—8.9%14[2 PRs](https://github.com/real-digital/gtin-validator/pulls)1Apache-2.0PHPPHP &gt;=7.1

Since May 24Pushed 4y ago5 watchersCompare

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

READMEChangelog (3)Dependencies (5)Versions (7)Used By (1)

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://github.com/real-digital/gtin-validator/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/real-digital/gtin-validator/actions)[![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 real-digital/gtin-validator
```

via GitHub

```
$ git clone https://github.com/real-digital/gtin-validator.git
```

### Usage

[](#usage)

```
