There is no license information available for the latest version (1.0.2) of this package.

PHP Laravel standalone validation library

1.0.2 2019-11-15 11:17 UTC

This package is auto-updated.

Last update: 2024-09-15 21:56:56 UTC


README

Build Status License

Requirements

  • PHP 7.1 or higher
  • Composer for installation

Installation

$ composer require david-kurniawan/validvid

Usage

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