facile-it/validoo

This package is abandoned and no longer maintained. No replacement package was suggested.

A super-simple validation class for PHP7.1

2.1.0 2017-02-06 13:26 UTC

This package is auto-updated.

Last update: 2020-02-05 09:12:53 UTC


README

Stable release Total Downloads Unstable release Build status Coverage Status Scrutinizer

Installation

composer require facile-it/validoo

Configuration

namespace Foo;

use Validoo\Validator; // << Add this

...

Usage

$inputs = [
    "field"  => "alphanumeric string",
    "field2" => "report-2016-12-20.csv", 
];
$rules = [
    "field"  => "required|alpha",
    "field2" => "onlyifset|is_filename",
];

$validator = Validator::validate($inputs, $rules);

echo $validator->isSuccess();  // print true