do not use Rule (deprecated), changed to Validate

This commit is contained in:
Andras Bacsai
2024-11-05 09:36:40 +01:00
parent d24d1394f7
commit 9b578b2003
26 changed files with 201 additions and 198 deletions

View File

@@ -4,53 +4,53 @@ namespace App\Livewire\Notifications;
use App\Models\Team;
use App\Notifications\Test;
use Livewire\Attributes\Rule;
use Livewire\Attributes\Validate;
use Livewire\Component;
class Telegram extends Component
{
public Team $team;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramEnabled = false;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramToken = null;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramChatId = null;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramNotificationsTest = false;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramNotificationsDeployments = false;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramNotificationsStatusChanges = false;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramNotificationsDatabaseBackups = false;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramNotificationsScheduledTasks = false;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramNotificationsTestMessageThreadId = null;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramNotificationsDeploymentsMessageThreadId = null;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramNotificationsStatusChangesMessageThreadId = null;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramNotificationsDatabaseBackupsMessageThreadId = null;
#[Rule(['nullable', 'string'])]
#[Validate(['nullable', 'string'])]
public ?string $telegramNotificationsScheduledTasksThreadId = null;
#[Rule(['boolean'])]
#[Validate(['boolean'])]
public bool $telegramNotificationsServerDiskUsage = false;
public function mount()