New-Thanasoft/thanasoft-back/app/Http/Requests/SendWebmailMessageRequest.php
2026-05-04 16:46:14 +03:00

36 lines
966 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SendWebmailMessageRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'to' => ['required', 'array', 'min:1'],
'to.*' => ['required', 'email:rfc,dns'],
'cc' => ['nullable', 'array'],
'cc.*' => ['email:rfc,dns'],
'bcc' => ['nullable', 'array'],
'bcc.*' => ['email:rfc,dns'],
'subject' => ['nullable', 'string', 'max:255'],
'body' => ['required', 'string'],
'folder' => ['nullable', 'string', 'max:30'],
'attachments' => ['nullable', 'array'],
'metadata' => ['nullable', 'array'],
'message_uid' => ['nullable', 'string', 'max:255'],
];
}
}