txthinking/validation

Use Laravel 5 validation as a standalone component.

v5.2 2016-03-11 03:32 UTC

This package is not auto-updated.

Last update: 2020-03-30 05:10:29 UTC


README

Installation

Use Laravel 5 validation as a standalone component

$ composer require txthinking/validation

Usage

<?php
use Tx\Validator;

$v = Validator::make(
    ['name' => 'Day007'],
    ['name' => 'required|max:5'],
    ['name.max' => 'who are u 007']
);
if ($v->fails()){
    var_dump($v->messages());
}

Documentation

http://laravel.com/docs/5.2/validation