<?php

namespace app\admin\validate;

use think\Validate;

class ArticleValidate extends Validate
{
    protected $rule = [
        'cate_id'  => 'require',
        'title'    => 'require',
        'priority' => 'require|number',
        'volume'   => 'require|number',
    ];

    protected $message = [
        'cate_id'          => '分类不能为空',
        'title'            => '标题不能为空',
        'priority.require' => '排序不能为空',
        'priority.number'  => '排序必须是数字',
        'volume.require'   => '浏览量不能为空',
        'volume.number'    => '浏览量必须是数字',
    ];

}