manghe/app/admin/validate/Danye.php
2025-03-21 19:25:07 +08:00

36 lines
599 B
PHP
Executable File

<?php
declare (strict_types = 1);
namespace app\admin\validate;
use think\Validate;
class Danye extends Validate
{
/**
* 定义验证规则
* 格式:'字段名' => ['规则1','规则2'...]
*
* @var array
*/
protected $rule = [
'content' => 'require',
];
/**
* 定义错误信息
* 格式:'字段名.规则名' => '错误信息'
*
* @var array
*/
protected $message = [
'content.require' => '单页详情不能为空',
];
protected $scene = [
'edit' => ['content'],
];
}