31 lines
803 B
PHP
31 lines
803 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Bo;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class BrevoWehbookRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'items' => 'required|array|min:1',
|
|
'items.0.From.Address' => 'required|email',
|
|
'items.0.To.*.Address' => 'required|email|in:mailing@reply.uwil.fr',
|
|
'items.0.ExtractedMarkdownMessage' => 'required|string|min:10',
|
|
];
|
|
}
|
|
}
|