Files
ntonpower/app/api/validate/SoftManualBtn.php
2026-10-14 14:00:29 +08:00

36 lines
766 B
PHP

<?php
namespace app\api\validate;
use think\Validate;
class SoftManualBtn extends Validate
{
/**
* 定义验证规则
* 格式:'字段名' => ['规则1','规则2'...]
*
* @var array
*/
protected $rule = [
'id' => ['integer','gt:0','require'],
'soft_manual_id|文档手册' => ['integer','gt:0'],
'btn_tips|按钮名称' => ['length:1,20'],
'url|下载链接' => ['length:1,128'],
];
/**
* 定义错误信息
* 格式:'字段名.规则名' => '错误信息'
*
* @var array
*/
protected $message = [];
/**
* @var array
*/
protected $scene = [
'index' => [],
];
}