app/Http/Requests/Hospital/HospitalRequest.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 [
            'name'=> 'required|min:5|max:255|regex:/^([a-zA-Z]+)(\s[a-zA-Z]+)+$/|unique:hospitals,name'
        ];
    }
public function rules ( ) { return [ 'name' => 'required|min:5|max:255|regex:/^([a-zA-Z]+)(\s[a-zA-Z]+)+$/|unique:hospitals,name' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .