Skip to content

A free open source IT asset/license management system

adds a couple error messages

Godfrey M62b4c7915045
diff --git a/app/Http/Livewire/SlackSettingsForm.php b/app/Http/Livewire/SlackSettingsForm.php
index 42d5a70824..9e7670d218 100644
--- a/app/Http/Livewire/SlackSettingsForm.php
+++ b/app/Http/Livewire/SlackSettingsForm.php
@@ -4,9 +4,6 @@ namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\Setting;
-use App\Http\Requests\Request;
-
-
class SlackSettingsForm extends Component
{
@@ -21,10 +18,16 @@ class SlackSettingsForm extends Component
'slack_channel' => 'required_with:slack_endpoint|starts_with:#|nullable',
'slack_botname' => 'string|nullable',
];
+ protected $messages = [
+ 'slack_endpoint.required_with' => 'Slack endpoint is required',
+ 'slack_endpoint.starts_with' => 'Slack endpoint must start with https://hooks.slack.com',
+
+
+ ];
public function mount(){
- $this->setting= Setting::getSettings();
+ $this->setting = Setting::getSettings();
$this->slack_endpoint = $this->setting->slack_endpoint;
$this->slack_channel = $this->setting->slack_channel;
$this->slack_botname = $this->setting->slack_botname;