Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vlauciani/laravel-validation-rules

Laravel Validation Rule
https://github.com/vlauciani/laravel-validation-rules

laravel php rfc3339 rules validation

Last synced: 25 days ago
JSON representation

Laravel Validation Rule

Awesome Lists containing this project

README

        

# laravel-validation-rules
[![Tests](https://github.com/vlauciani/laravel-validation-rules/actions/workflows/phpunit.yml/badge.svg)](https://github.com/vlauciani/laravel-validation-rules/actions)
[![Packagist License](https://poser.pugx.org/vlauciani/laravel-validation-rules/license.png)](http://choosealicense.com/licenses/mit/)
[![Total Downloads](https://poser.pugx.org/vlauciani/laravel-validation-rules/d/total.png)](https://packagist.org/packages/vlauciani/laravel-validation-rules)

## Installation
```
composer require vlauciani/laravel-validation-rules:^1.0.0
```

## Available Rules

### RFC3339Extended
PHP doesn't validate correctly RFC3339: https://github.com/laravel/framework/issues/35387
* for example `2020-12-21T23:59:59+00:00` or `2020-12-21T23:59:59Z` return `false` but it is `true`.

this *Rule* uniform the date in format: `YYYY-MM-DDThh:mm:ss.mmm+nn:nn`

## Usage
```
'2022-04-06T12:00:00.123+00:00']
Validator::make($myData, [
'starttime' => [new RFC3339ExtendedRule()],
])->validate();
}
}
```

## Contribute
Thanks to your contributions!

Here is a list of users who already contributed to this repository:


## Author
(c) 2022 Valentino Lauciani vlauciani[at]gmail.com

## Thanks to
- https://github.com/vdhicts/laravel-validation-rules