Skip to content

A validator for Laravel to check for correct EAN codes in requests

Notifications You must be signed in to change notification settings

joe-pritchard/laravel-ean-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A validator for Laravel to check for correct EAN codes in requests

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages