PHPackages                             notch/credit-card - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. notch/credit-card

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

notch/credit-card
=================

Validate credit card number, expiration date, cvc

1.1(2y ago)065Apache-2.0PHPPHP 7.\*|8.\*

Since Mar 20Pushed 2y agoCompare

[ Source](https://github.com/notchafrica/credit-card)[ Packagist](https://packagist.org/packages/notch/credit-card)[ RSS](/packages/notch-credit-card/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Validator Rules - Credit Card
=====================================

[](#laravel-validator-rules---credit-card)

This rule will validate that a given credit card **number**, **expiration date** or **cvc** is valid.

 [ ![](https://camo.githubusercontent.com/4c63fe69de6215be69b9725a0c3b6423c6b102d9731610b3ebb5088439eac809/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d76616c69646174696f6e2d72756c65732f6372656469742d636172642e7376673f7374796c653d666c61742d737175617265) ](https://travis-ci.org/laravel-validation-rules/credit-card) [ ![](https://camo.githubusercontent.com/2936224e527a9767bbefc11f3e9a4d15a86626eaf83f506cfc0fad6ba3ecec91/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d76616c69646174696f6e2d72756c65732f6372656469742d636172642e7376673f7374796c653d666c61742d737175617265) ](https://scrutinizer-ci.com/g/laravel-validation-rules/credit-card/code-structure/master/code-coverage) [ ![](https://camo.githubusercontent.com/21de7249f924de3c3fa1e10b0d228227de4981351eeab76117491102d56cabde/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d76616c69646174696f6e2d72756c65732f6372656469742d636172642e7376673f7374796c653d666c61742d737175617265) ](https://scrutinizer-ci.com/g/laravel-validation-rules/credit-card) [ ![](https://camo.githubusercontent.com/1d2d03d0c023837a0a3e111fb8f6fe75422e2ef2bcf27332cd727506e0170430/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c61726176656c2d76616c69646174696f6e2d72756c65732f6372656469742d636172642e7376673f7374796c653d666c61742d737175617265) ](https://github.com/laravel-validation-rules/credit-card/blob/master/LICENSE) [ ![](https://camo.githubusercontent.com/b76b74611f06f2ea7727cff9bf636833f09c4374a7ea963735ee05468dbf4d27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d76616c69646174696f6e2d72756c65732f6372656469742d636172642e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/laravel-validation-rules/credit-card) [ ![](https://camo.githubusercontent.com/240040ab41580a9ae6dfb8bbb105f653e675bf11ed97ec83ed1d33993850ade1/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d404461726b614f6e4c696e652d626c75652e7376673f7374796c653d666c61742d737175617265) ](https://twitter.com/DarkaOnLine)

Installation
------------

[](#installation)

```
composer require laravel-validation-rules/credit-card
```

Usage
-----

[](#usage)

### As FormRequest

[](#as-formrequest)

```
