init: 项目初始代码
This commit is contained in:
30
app/api/validate/GoodsSoftManual.php
Normal file
30
app/api/validate/GoodsSoftManual.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace app\api\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class GoodsSoftManual extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => ['integer','require','gt:0'],
|
||||
'soft_manual_id' => ['integer','require','gt:0'],
|
||||
'btn_tips' => ['length:1,128'],
|
||||
'url' => ['length:1,128'],
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [];
|
||||
|
||||
protected $scene = [];
|
||||
}
|
||||
Reference in New Issue
Block a user