app/Http/Requests/ModelDataRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'modelName' => 'required|max:50',
            'country' => 'required|alpha',
            'year' => 'required|date_format:"Y"',
            'engineCapacity'=>'regex:/\d{3,4}[c]{2}/',
            'fuelType'=>'required',
            'transmissionType'=>'required',
            'brandName'=>'required'
        ];
    }
public function rules ( ) { return [ 'modelName' => 'required|max:50' , 'country' => 'required|alpha' , 'year' => 'required|date_format:"Y"' , 'engineCapacity' => 'regex:/\d{3,4}[c]{2}/' , 'fuelType' => 'required' , 'transmissionType' => 'required' , 'brandName' => 'required' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .