Looking to hire Laravel developers? Try LaraJobs

laravel-ean-validator maintained by joe-pritchard

Description
A validator for Laravel to check for correct EAN codes
Author
Last update
2025/03/20 15:02 (dev-master)
License
Downloads
22 622

Comments
comments powered by Disqus

Ean Validator

Simple validator to check for correctly formatted EAN barcodes. Will pass for EAN8 and EAN13 codes

Installation

composer require joe-pritchard/laravel-ean-validator

Usage

In a controller you can use the class as a validator rule like this:

$this->validate($request, [
	'ean' => ['required', new JoePritchard\LaravelEanValidator\Rules\EanValidatorRule],
])

Or just call validate directly:

JoePritchard\LaravelEanValidator\LaravelEanValidator::validate($value)