summaryrefslogtreecommitdiff
path: root/app/models/ci/web_hook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/web_hook.rb')
-rw-r--r--app/models/ci/web_hook.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/ci/web_hook.rb b/app/models/ci/web_hook.rb
index 7ca16a1bde8..0dc15eb6683 100644
--- a/app/models/ci/web_hook.rb
+++ b/app/models/ci/web_hook.rb
@@ -20,8 +20,7 @@ module Ci
# HTTParty timeout
default_timeout 10
- validates :url, presence: true,
- format: { with: URI::regexp(%w(http https)), message: "should be a valid url" }
+ validates :url, presence: true, url: true
def execute(data)
parsed_url = URI.parse(url)