Luhn Rule

Validate a string against Luhn algorithm

72k 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(), [
    'attribute-key' => new Luhn(),
]);