chendujin/credit-card-verify

credit card validator

v1.1.0 2023-06-28 07:58 UTC

This package is auto-updated.

Last update: 2024-10-28 10:47:45 UTC


README

Packagist Software License Build Status Quality Score

Adds some minimal validation rules for credit card.

Install

Install via composer

composer require chendujin/credit-card-verify

Lumen

Register Service Provider bootstrap/app.php

$app->register(Chendujin\CreditCardVerify\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',
]);