<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use App\Http\Requests\FieldRequest;

class FieldRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }


    public function rules()
    {
        return [
            'topic' => 'bail|required|max:255',
            'date' => 'required',
            'comment' => 'required|max:255',
       ];
    }

    public function messages()
    {
        return [
            'topic.required' => 'The topic Name is required',
            'date.required'  => 'A date required',
            'comment.required'  => 'The comment is required',
        ];
    }

}
