<?php

namespace app\index\validate;

use think\Validate;

class CabinetValidate extends Validate
{
    protected $rule = array(
        'url'      => 'require|unique:cabinet',
        'cabinet_ip'        => 'require|unique:cabinet',
        'box_number'        => 'number',
    );
    protected $message = array(
        'cabinet_name.require'      => '柜子名称已经存在',
        'cabinet_sort.require'      => '柜子端口已经存在',
        'cabinet_ip.require'        => '柜子ip已经存在',
        'box_number.number'         => '箱子数量必须是数字',
    );
}