初始化本地仓库
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\validate\system;
|
||||
|
||||
use core\base\BaseValidate;
|
||||
|
||||
class NoticeValidate extends BaseValidate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
*/
|
||||
protected array $rule = [
|
||||
'id' => 'require',
|
||||
'message_id' => 'require',
|
||||
'title' => 'require',
|
||||
'content' => 'require',
|
||||
'enabled' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
*/
|
||||
protected array $message = [
|
||||
'id.require' => '参数错误缺少id',
|
||||
'message_id.require' => '参数错误缺少message_id',
|
||||
'title.require' => '公告名称必须填写',
|
||||
'content.require' => '公共内容不能为空',
|
||||
'enabled' => '状态必须填写',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义场景
|
||||
*/
|
||||
protected array $scene = [
|
||||
'store' => [
|
||||
'title',
|
||||
'type',
|
||||
'content',
|
||||
],
|
||||
'update' => [
|
||||
'id',
|
||||
'title',
|
||||
'type',
|
||||
'content',
|
||||
],
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user