UserNeedValidate.php 1.9 KB
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace api\portal\validate;

use think\Validate;

class UserNeedValidate extends Validate
{
    protected $rule = [
        'city' => 'require',
        'quarters' => 'require',
//        'room' => 'require',
//        'floor' => 'require',
        'house_type' => 'require',
        'renovation' => 'require',
        'area' => 'require',
        'is_first' => 'require',
        'loan' => 'require',
        'quotation_time' => 'require',
        'name' => 'require',
        'tel' => 'require',
        'contract' => 'require',
    ];
    protected $message = [
        'city.require' => '地区不能为空!',
        'quarters.require' => '小区不能为空!',
//        'room.length' => '房号不能为空!',
//        'floor.length' => '楼层不能为空!',
        'house_type.require' => '户型不能为空!',
        'renovation.require' => '装修不能为空!',
        'area.require' => '建筑面积不能为空!',
        'is_first.require' => '是否首套房不能为空!',
        'loan.require' => '贷款不能为空!',
        'quotation_time.require' => '报价时间不能为空!',
        'name.require' => '联系人姓名不能为空!',
        'tel.require' => '联系人电话不能为空!',
        'contract.require' => '请选择是否包干价!',
    ];

    protected $scene = [

    ];

}