rap2hpoutre / uuid-rule
add a UUID validation rule
Installs: 3 667
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 4
Open Issues: 0
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], ]);