zeroplex/ean13-validator

Easy helper to check if EAN_13 barcode value is valid

v1.3.2 2019-10-27 13:45 UTC

This package is auto-updated.

Last update: 2024-05-04 16:11:00 UTC


README

This library provider fast code checker for EAN_13, EAN_8, ISBN, TaiwanID.

Installation

use composer to install:

composer require zeroplex/ean13-validator

Usage

Validate:

<?php

use Zeroplex\Ean13;

Ean13::isValid('4908569219689'); // true

Ean13::isValid('4908569219680'); // false

Get checksum:

<?php

Ean13::getCheckSum('4908569219689'); // 9

Ean13::getCheckSum('4908569219680'); // 9