https://github.com/david-kurniawan/validvid
PHP Laravel standalone validation library
https://github.com/david-kurniawan/validvid
laravel php php-library php-standalone-library validation
Last synced: about 1 year ago
JSON representation
PHP Laravel standalone validation library
- Host: GitHub
- URL: https://github.com/david-kurniawan/validvid
- Owner: David-Kurniawan
- License: mit
- Created: 2019-11-15T07:24:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-15T11:18:29.000Z (over 6 years ago)
- Last Synced: 2025-03-14T16:03:21.446Z (about 1 year ago)
- Topics: laravel, php, php-library, php-standalone-library, validation
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Validation Standalone Library
[](https://travis-ci.org/David-Kurniawan/validvid)
[](http://doge.mit-license.org)
## Requirements
* PHP 7.1 or higher
* Composer for installation
## Installation
```sh
$ composer require david-kurniawan/validvid
```
## Usage
```php
use Validvid\Validation\Validator;
$data['email'] = 'foobar@gmail.com';
$rules = ['email' => 'required|email|not_in:foobar@gmail.com'];
$errors = null;
$validator = (new Validator())->make($data, $rules);
if ($validator->fails()) {
$errors = $validator->errors();
}
return $errors;
```
More usage: [Laravel Validation](https://laravel.com/docs/6.x/validation)