<?php
namespace app\api\validate;

use think\Validate;

class Worker extends Validate
{
    protected $rule =   [
        'code'  => 'require|length:10,20',
    ];
    
    protected $message  =   [
        'code'      => '长度必须在10-20之间',
    ];

    protected $scene = [
        'scan'  =>  ['code'],
    ]; 
}