macromindonline / laravel-credit-card-validator
Laravel credit card validator
v0.0.6
2016-08-30 14:37 UTC
Requires
- php: >=5.5.0
- illuminate/support: 5.*
- inacho/php-credit-card-validator: ^1.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-12-11 05:13:35 UTC
README
Adds some minimal validation rules for credit card.
Install
Install via composer
composer require rap2hpoutre/laravel-credit-card-validator
Add Service Provider to config/app.php
in providers
section
Rap2hpoutre\LaravelCreditCardValidator\ServiceProvider::class,
Usage
Add this to your validation rules:
// Add this in your controller method $this->validate($request, [ 'credit-card-number' => 'required|ccn', 'credit-card-date' => 'required|ccd', 'credit-validation-code' => 'required|cvc', ]);