<?php
namespace app\api\validate;

use app\common\model\firm\FirmRegister;
use app\common\validate\BaseValidate;

/**
 * @author 林海涛
 * @date 2024/7/12 下午2:19
 */
class FirmRegisterValidate extends BaseValidate
{
    protected $rule = [
        'firm_name' => 'require|unique:'.FirmRegister::class,
        'user_name' => 'require',
        'mobile' => 'require|mobile|unique:'.FirmRegister::class,
        'address' => 'require',
    ];


    protected $message = [
        'firm_name.require' => '请输入公司名称',
        'firm_name.unique' => '公司名称已存在',
        'user_name.mobile' => '请输入用户姓名',
        'mobile.require' => '请填写手机号',
        'mobile.unique' => '手机号已经注册',
        'mobile.mobile' => '手机号格式不正确',
    ];
}