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

41 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpsertUserMailboxSettingRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'imap_host' => ['nullable', 'string', 'max:255'],
'imap_port' => ['nullable', 'integer', 'min:1', 'max:65535'],
'imap_encryption' => ['nullable', 'string', 'in:ssl,tls,starttls,none'],
'imap_validate_cert' => ['nullable', 'boolean'],
'imap_username' => ['nullable', 'string', 'max:255'],
'imap_password' => ['nullable', 'string', 'max:500'],
'imap_folder' => ['nullable', 'string', 'max:255'],
'smtp_host' => ['nullable', 'string', 'max:255'],
'smtp_port' => ['nullable', 'integer', 'min:1', 'max:65535'],
'smtp_encryption' => ['nullable', 'string', 'in:ssl,tls,none'],
'smtp_validate_cert' => ['nullable', 'boolean'],
'smtp_username' => ['nullable', 'string', 'max:255'],
'smtp_password' => ['nullable', 'string', 'max:500'],
'smtp_from_address' => ['nullable', 'email:rfc,dns'],
'smtp_from_name' => ['nullable', 'string', 'max:255'],
'clear_imap_password' => ['nullable', 'boolean'],
'clear_smtp_password' => ['nullable', 'boolean'],
];
}
}