Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rap2hpoutre/laravel-credit-card-validator
:hatched_chick: Laravel Credit Card Validator
https://github.com/rap2hpoutre/laravel-credit-card-validator
composer credit-card laravel php
Last synced: 3 months ago
JSON representation
:hatched_chick: Laravel Credit Card Validator
- Host: GitHub
- URL: https://github.com/rap2hpoutre/laravel-credit-card-validator
- Owner: rap2hpoutre
- License: mit
- Created: 2016-06-03T12:37:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-27T06:50:02.000Z (about 4 years ago)
- Last Synced: 2024-10-14T10:46:25.839Z (3 months ago)
- Topics: composer, credit-card, laravel, php
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 21
- Watchers: 5
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Credit Card Validator
[![Packagist](https://img.shields.io/packagist/v/rap2hpoutre/laravel-credit-card-validator.svg)]()
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://img.shields.io/scrutinizer/build/g/rap2hpoutre/laravel-credit-card-validator.svg?style=flat-square)](https://travis-ci.org/rap2hpoutre/laravel-credit-card-validator)
[![Quality Score](https://img.shields.io/scrutinizer/g/rap2hpoutre/laravel-credit-card-validator.svg?style=flat-square)](https://scrutinizer-ci.com/g/rap2hpoutre/laravel-credit-card-validator)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/801ce3d1-ac8c-455e-9e4d-53b3d0b3991a/mini.png)](https://insight.sensiolabs.com/projects/801ce3d1-ac8c-455e-9e4d-53b3d0b3991a)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
```php
Rap2hpoutre\LaravelCreditCardValidator\ServiceProvider::class,
```## Usage
Add this to your validation rules:
```php
// Add this in your controller method
$this->validate($request, [
'credit-card-number' => 'required|ccn',
'credit-card-date' => 'required|ccd',
'credit-validation-code' => 'required|cvc',
]);
```