mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
adds a couple error messages
This commit is contained in:
parent
a69cb6204a
commit
62b4c79150
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue