caipan_shop_admin/app/validate/MessageValidate.php

19 lines
468 B
PHP
Executable File

<?php
namespace app\validate;
use think\Validate;
class MessageValidate extends Validate
{
protected $rule = [
'title|消息标题' => 'max:100',
'summary|消息简述' => 'max:500',
'content|消息内容' => 'require|max:3000',
'send_at|发送时间' => 'date',
];
protected $scene = [
'add' => ['title', 'summary', 'content', 'send_at'],
'edit' => ['title', 'summary', 'content', 'send_at'],
];
}