txthinking/validation

将Laravel 5验证作为一个独立组件使用。

此软件包的官方仓库似乎已丢失,因此该软件包已被冻结。

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

This package is not auto-updated.

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


README

安装

将Laravel 5验证作为一个独立组件使用

$ composer require txthinking/validation

用法

<?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());
}

文档

https://laravel.net.cn/docs/5.2/validation