test_lgq/niucloud/app/validate/diy/Diy.php

39 lines
1.1 KiB
PHP
Raw Normal View History

2024-01-24 17:36:08 +08:00
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的saas管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud-admin.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\validate\diy;
use think\Validate;
/**
* 自定义页面验证器
* Class Diy
* @package app\validate\diy
*/
class Diy extends Validate
{
protected $rule = [
'title' => 'require',
'name' => 'require',
'type' => 'require',
'value' => 'require',
'is_default' => 'number|between:0,1',
];
protected $message = [];
protected $scene = [
"add" => ['title', 'name', 'type', 'value', 'is_default'],
"edit" => ['title', 'name', 'value', 'is_default'],
];
}