25 lines
400 B
Plaintext
25 lines
400 B
Plaintext
|
<?php
|
||
|
|
||
|
namespace {%namespace%};
|
||
|
|
||
|
use think\Validate;
|
||
|
|
||
|
class {%className%} extends Validate
|
||
|
{
|
||
|
/**
|
||
|
* 定义验证规则
|
||
|
* 格式:'字段名' => ['规则1','规则2'...]
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
protected $rule = [];
|
||
|
|
||
|
/**
|
||
|
* 定义错误信息
|
||
|
* 格式:'字段名.规则名' => '错误信息'
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
protected $message = [];
|
||
|
}
|