<?php
|
|
namespace App\Http\Requests;
|
|
use Illuminate\Http\Exceptions\HttpResponseException;
|
use Illuminate\Contracts\Validation\Validator;
|
use Illuminate\Foundation\Http\FormRequest;
|
|
class SendMailSend extends FormRequest
|
{
|
/**
|
* Determine if the user is authorized to make this request.
|
*
|
* @return bool
|
*/
|
public function authorize()
|
{
|
return true;
|
}
|
|
protected function failedValidation(Validator $validator) {
|
throw new HttpResponseException(response()->json($validator->errors(), 422));
|
}
|
|
/**
|
* Get the validation rules that apply to the request.
|
*
|
* @return array<string, mixed>
|
*/
|
public function rules()
|
{
|
return [
|
'request_mail_id' => 'required|string|max:255',
|
];
|
}
|
|
/**
|
* Handle a passed validation attempt.
|
*/
|
protected function passedValidation(): void
|
{
|
return;
|
}
|
|
}
|