VIN Rule
Validate Vehicle Identification Numbers
162k Downloads / Month
Open Source MIT License
162k Downloads / Month
Open Source MIT License
Learn how to validate Vehicle Identification Numbers (VIN) with the additional validation rules of Intervention Validation for your Laravel application.
public Intervention\Validation\Rules\Vin::__construct(bool $checkDigit = false)
The field under validation must be a valid Vehicle identification number according to ISO-3779.
checkDigit
Optional verification according to the North American check system. Default false. Please note that enabling the check digit will cause all VINs without check digit encoded (such as European VIns) to be recognized as invalid, even though they are actually valid.
use Illuminate\Support\Facades\Validator; use Intervention\Validation\Rules\Vin; $validator = Validator::make($request->all(), [ 'attribute-key' => new Vin(), ]);