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:
committed by
Charlie Smurthwaite
parent
5634640fd8
commit
98daf6d30c
@@ -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) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user