Add possibility to use other ports than 80/443 in webhooks (#234)

* Added possibility to use other ports than 80/443

* simplify regex to allow colon anywhere
This commit is contained in:
anhofmann
2017-08-21 22:23:31 +01:00
committed by Charlie Smurthwaite
parent 5634640fd8
commit 98daf6d30c
+1 -1
View File
@@ -28,7 +28,7 @@ class Webhook < ApplicationRecord
has_many :webhook_requests
validates :name, :presence => true
validates :url, :presence => true, :format => {:with => /\Ahttps?\:\/\/[a-z0-9\-\.\_\?\&\/\+]+\z/i, :allow_blank => true}
validates :url, :presence => true, :format => {:with => /\Ahttps?\:\/\/[a-z0-9\-\.\_\?\&\/\+:]+\z/i, :allow_blank => true}
scope :enabled, -> { where(:enabled => true) }