LaravelPackages.net
Acme Inc.
Toggle sidebar
hipsterjazzbo/laravel-luhn-validator

A luhn algorithm validator for Laravel 4's Validator

11.302
3
1.0
About hipsterjazzbo/laravel-luhn-validator

hipsterjazzbo/laravel-luhn-validator is a Laravel package for a luhn algorithm validator for laravel 4's validator. It currently has 3 GitHub stars and 11.302 downloads on Packagist (latest version 1.0). Install it with composer require hipsterjazzbo/laravel-luhn-validator. Discover more Laravel packages by hipsterjazzbo or browse all Laravel packages to compare alternatives.

Last updated

Laravel Luhn Validator

A luhn algorithm validator for Laravel 4's Validator.

Installation

Start by adding this package to your composer.json:

"require-dev": {
    "hipsterjazzbo/laravel-luhn-validator": "1.*"
}

Now you've got to update composer:

$ composer update

And then add this package to the ServiceProviders array in your app/config/app.php:

'HipsterJazzbo\LaravelLuhnValidator\LaravelLuhnValidatorServiceProvider'

Usage

Just specify the new rule when you're defining your rules:

$rules = [
    'card_number' => [
        'required',
        'luhn'
    ]
];

Learn more about Laravel validation

Star History Chart