<?php
/**
 * @author 林海涛
 * @date ${DATA}
 */
namespace app\workerapi\validate;

use app\common\model\master_worker_register\MasterWorkerRegister;
use app\common\validate\BaseValidate;

/**
 * 注册验证器
 * Class RegisterValidate
 * @package app\api\validate
 */
class RegisterValidate extends BaseValidate
{
    protected $rule = [
        //'other_exp_type' => 'require',
        'vehicle_type' => 'require',
        'name' => 'require',
        'age' => 'require|number|between:18,55',
        'mobile' => 'require|mobile',
        'code' => 'require',
        'city' => 'require',
        //'maintain_exp_type' => 'require',
        'lon' => 'require',
        'lat' => 'require',
        'address'=>'require',
    ];

    protected $message = [
        //'other_exp_type.require' => '其他经验必填',
        'vehicle_type.require' => '交通工具必填',
        'name.require' => '账号必填',
        'age.require' => '年龄必填',
        'age.number' => '年龄必须为数字',
        'age.between' => '年龄只能在18-55之间',
        'mobile.mobile' => '请输入正确手机号',
        'code.require' => '请输入验证码',
        'city.require' => '请输入城市',
        //'maintain_exp_type.require' => '请输入维修经验',
        'lon.require' => '请输入经度',
        'lat.require' => '请输入维度',
        'address.require'=>'请输入详细地址',
    ];
}