An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# UUID validation rule
[![Version](https://poser.pugx.org/rap2hpoutre/uuid-rule/version?format=flat)](https://packagist.org/packages/rap2hpoutre/uuid-rule)
[![License](https://poser.pugx.org/rap2hpoutre/uuid-rule/license?format=flat)](https://packagist.org/packages/rap2hpoutre/uuid-rule)
[![Build Status](https://travis-ci.org/rap2hpoutre/uuid-rule.svg?branch=master)](https://travis-ci.org/rap2hpoutre/uuid-rule)
[![Total Downloads](https://poser.pugx.org/rap2hpoutre/uuid-rule/downloads)](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],
]);
```