webman后台
This commit is contained in:
32
dafuweng-webman/app/admin/validate/Config.php
Normal file
32
dafuweng-webman/app/admin/validate/Config.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Config extends Validate
|
||||
{
|
||||
protected $failException = true;
|
||||
|
||||
protected $rule = [
|
||||
'name' => 'require|unique:config',
|
||||
];
|
||||
|
||||
protected $message = [];
|
||||
|
||||
protected $field = [];
|
||||
|
||||
protected $scene = [
|
||||
'add' => ['name'],
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->field = [
|
||||
'name' => __('Variable name'),
|
||||
];
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user