<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class Updatedriver extends FormRequest
{
    /**
     * 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 [
        'first_name'=>'required',
        'last_name'=>'required',
        'phone_number'=>'required|numeric',
        'email'=>'required|email',
        'address_line1'=>'required',
        'first_name'=>'required',
        'town'=>'required',
        'post_code'=>'required',
        'pro_name_company'=>'required',
        'date_of_birth'=>'required',
        'national_insurance_number'=>'required',
        'driving_experience'=>'required',
        'Personal_bank_name'=>'required',
        'bank_sort_code'=>'required',
        'bank_account_number'=>'required',
        ];
    }

    public function messages()
    {
        return[
           'pro_name_company.required' => 'The proposed name of Company is required',
     'quilification_card.required' => 'The qualification card field is required',
     'training_cirtificate.required' => 'The training certificate field is required',
     'laibility_insurance.required' => ' The liability insurance field is required',
        ];
    } 
}
