<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class TableRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'bzc_addr'=>'required',
            'bzc_cardid'=>'required|numeric',
            'bzc_name'=>'required',
            'bzc_tel'=>'required|numeric',
        ];
    }

    public function messages()
    {
        return [
            'bzc_addr.required'=>'被征收地址不能为空',
            'bzc_cardid.required'=>'身份证不能为空',
            'bzc_cardid.numeric'=>'身份证只能输入数字',
            'bzc_name.required'=>'被征收人姓名必填',
            'bzc_tel.required'=>'被征收人电话必填',
            'bzc_tel.numeric'=>'被征收人电话只能输入数字',
        ];
    }
}
