validator.stub 541 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php
/**
 * Created by PhpStorm.
 * User: %user%
 * Date: %date%
 * Time: %time%
 * Description:
 */

declare(strict_types=1);

namespace App\Validators;

use Meibuyu\Micro\Validator\Contracts\ValidatorInterface;
use Meibuyu\Micro\Validator\HyperfValidator;

class %ModelClass%Validator extends HyperfValidator
{
王源's avatar
王源 committed
19

20 21
    protected $rules = [
        ValidatorInterface::RULE_CREATE => [
22
%createRules%
23 24
        ],
        ValidatorInterface::RULE_UPDATE => [
25
%updateRules%
26 27 28 29 30 31 32 33
        ],
    ];

    protected $attributes = [
%attributes%
    ];

}