<?php

declare(strict_types=1);

namespace app\admin\validate;

use think\Validate;

class AdminGroup extends Validate
{
    protected $failException = true;

    protected $rule = [
        'name'  => 'require',
        'rules' => 'require',
    ];

    protected $message = [];

    protected $field = [];

    protected $scene = [
        'add'  => ['name', 'rules'],
        'edit' => ['name', 'rules'],
    ];

    public function __construct()
    {
        $this->field = [
            'name' => __('name'),
        ];
        $this->message = [
            'rules' => __('Please select rules'),
        ];
        parent::__construct();
    }
}
