obsidian/validation

Validates input against string rulesets.

v0.1.0 2021-02-27 17:25 UTC

This package is auto-updated.

Last update: 2021-05-07 14:18:43 UTC


README

Validates input against string rulesets.

Installation

Installation is done entirely through composer.

composer require obsidian/validation

Example

use Obsidian\Validation\Validator;

$nofail = Validator::make(
    array(
        'username' => 'string|required|min:5|max:75',
        'email' => 'email'
    )
);

var_dump($nofail->validate(array(
    'username' => 'git',
    'email' => 'noreply@github.com'
))); // bool(true)