From 80d36cd72bda8adfa985b19617e62e0cc55ae52c Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 8 Dec 2021 15:53:05 -0800 Subject: [PATCH] Added slack settings request Signed-off-by: snipe --- app/Http/Requests/SlackSettingsRequest.php | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 app/Http/Requests/SlackSettingsRequest.php diff --git a/app/Http/Requests/SlackSettingsRequest.php b/app/Http/Requests/SlackSettingsRequest.php new file mode 100644 index 0000000000..d838fde462 --- /dev/null +++ b/app/Http/Requests/SlackSettingsRequest.php @@ -0,0 +1,36 @@ + 'url|required_with:slack_channel|starts_with:https://hooks.slack.com|nullable', + 'slack_channel' => 'required_with:slack_endpoint|starts_with:#|nullable', + 'slack_botname' => 'string|nullable', + + ]; + } + + public function response(array $errors) + { + return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag); + } +}