diff options
| author | Robert Speicher <rspeicher@gmail.com> | 2015-12-01 18:45:36 -0500 |
|---|---|---|
| committer | Robert Speicher <rspeicher@gmail.com> | 2015-12-07 16:57:26 -0500 |
| commit | d5ea93469b4ec95916361c61876c949f60539211 (patch) | |
| tree | a2a91371b4709725734016910ffb782b2dfd45a2 /app/models/ci | |
| parent | 2928e19d4356683119cf0d2bb269752253ea5d50 (diff) | |
| download | gitlab-ce-d5ea93469b4ec95916361c61876c949f60539211.tar.gz | |
Add custom UrlValidator
Diffstat (limited to 'app/models/ci')
| -rw-r--r-- | app/models/ci/web_hook.rb | 3 |
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) |
