Luhn Rule

Validate a string against Luhn algorithm

50.7k Downloads / Month

Open Source MIT License

public Intervention\Validation\Rules\Luhn::__construct()

The given value must verify against its included Luhn algorithm check digit.

Parameters

none

Example

use Intervention\Validation\Rules\Luhn;

$validator = Validator::make($request->all(), [
    'my-value' => new Luhn(),
]);