https://github.com/rap2hpoutre/uuid-rule
UUID validation rule for Laravel
https://github.com/rap2hpoutre/uuid-rule
laravel laravel-5 laravel-5-package library uuid
Last synced: 3 months ago
JSON representation
UUID validation rule for Laravel
- Host: GitHub
- URL: https://github.com/rap2hpoutre/uuid-rule
- Owner: rap2hpoutre
- License: mit
- Created: 2017-10-11T07:55:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T17:04:10.000Z (over 5 years ago)
- Last Synced: 2025-04-11T02:51:19.091Z (about 1 year ago)
- Topics: laravel, laravel-5, laravel-5-package, library, uuid
- Language: PHP
- Size: 39.1 KB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# UUID validation rule
[](https://packagist.org/packages/rap2hpoutre/uuid-rule)
[](https://packagist.org/packages/rap2hpoutre/uuid-rule)
[](https://travis-ci.org/rap2hpoutre/uuid-rule)
[](https://packagist.org/packages/rap2hpoutre/uuid-rule)
## What?
Add a UUID validation to your Laravel 5.5+ Validation Rules
## Install
Install with composer:
```bash
composer require rap2hpoutre/uuid-rule
```
## Usage
In your controllers, add the validation with your other rules:
```php
$request->validate([
'email' => 'required|string|email'
'uuid' => ['required', new \Rap2hpoutre\UuidRule\UuidRule],
]);
```