From 81f837138dbeb9ca661b425b129443d8cc51220e Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:59:00 +0100 Subject: [PATCH] fix validation --- app/Livewire/Notifications/Email.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Livewire/Notifications/Email.php b/app/Livewire/Notifications/Email.php index 94b5e17c2f..fcedf13056 100644 --- a/app/Livewire/Notifications/Email.php +++ b/app/Livewire/Notifications/Email.php @@ -138,6 +138,13 @@ public function syncData(bool $toModel = false) public function sendTestEmail() { try { + $this->validate([ + 'testEmailAddress' => 'required|email', + ], [ + 'testEmailAddress.required' => 'Test email address is required.', + 'testEmailAddress.email' => 'Please enter a valid email address.', + ]); + $executed = RateLimiter::attempt( 'test-email:'.$this->team->id, $perMinute = 0,