summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/web_hook.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index 96684d15f8a..0058bd57b91 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -9,7 +9,7 @@ class WebHook < ActiveRecord::Base
validates :url,
presence: true,
format: {
- with: /(^$)|(^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$)/ix,
+ with: URI::regexp(%w(http https)),
message: "should be a valid url" }
def execute(data)