rap2hpoutre / uuid-rule
add a UUID validation rule
v0.2.0
2018-11-05 08:23 UTC
Requires
- php: ^7.0
- laravel/framework: ^5.5
- ramsey/uuid: ^3.7
Requires (Dev)
- phpunit/phpunit: ^6.5 || ^7.0
README
What?
Add a UUID validation to your Laravel 5.5+ Validation Rules
Install
Install with composer:
composer require rap2hpoutre/uuid-rule
Usage
In your controllers, add the validation with your other rules:
$request->validate([ 'email' => 'required|string|email' 'uuid' => ['required', new \Rap2hpoutre\UuidRule\UuidRule], ]);