mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-23 07:40:18 +00:00
48 lines
1.0 KiB
PHP
48 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace app\admin\validate;
|
|
|
|
use think\Validate;
|
|
|
|
class SensitiveData extends Validate
|
|
{
|
|
protected $failException = true;
|
|
|
|
protected $rule = [
|
|
'controller' => 'require|unique:security_sensitive_data',
|
|
'data_table' => 'require',
|
|
'primary_key' => 'require',
|
|
'data_fields' => 'require',
|
|
];
|
|
|
|
/**
|
|
* 验证提示信息
|
|
* @var array
|
|
*/
|
|
protected $message = [];
|
|
|
|
/**
|
|
* 字段描述
|
|
*/
|
|
protected $field = [
|
|
];
|
|
|
|
/**
|
|
* 验证场景
|
|
*/
|
|
protected $scene = [
|
|
'add' => ['data_fields', 'controller', 'data_table', 'primary_key'],
|
|
'edit' => ['data_fields', 'controller', 'data_table', 'primary_key'],
|
|
];
|
|
|
|
public function __construct()
|
|
{
|
|
$this->field = [
|
|
'data_fields' => __('Data Fields'),
|
|
'controller' => __('Controller'),
|
|
'data_table' => __('Data Table'),
|
|
'primary_key' => __('Primary Key'),
|
|
];
|
|
parent::__construct();
|
|
}
|
|
} |