Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-06-24 12:35:32 +0300
committerJames Lopez <james@jameslopez.es>2016-06-24 12:35:32 +0300
commit8076d38a1487dd5b64153cd20eb696358b2f7acf (patch)
tree240ecbeecec07ebc98f8b51877c78efd05437533 /app/validators
parent58c49966fa73469e324c51e26d8bc9a482627818 (diff)
added more info on how addressable URI differs from what we use in UrlValidator
Diffstat (limited to 'app/validators')
-rw-r--r--app/validators/addressable_url_validator.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/validators/addressable_url_validator.rb b/app/validators/addressable_url_validator.rb
index cbb80b5c68e..634a15aea01 100644
--- a/app/validators/addressable_url_validator.rb
+++ b/app/validators/addressable_url_validator.rb
@@ -1,6 +1,8 @@
# AddressableUrlValidator
#
-# Custom validator for URLs. This is a stricter version of UrlValidator.
+# Custom validator for URLs. This is a stricter version of UrlValidator - it also checks
+# for using the right protocol, but it actually parses the URL checking for any syntax errors.
+# The regex is also different from `URI` as we use `Addressable::URI` here.
#
# By default, only URLs for http, https, ssh, and git protocols will be considered valid.
# Provide a `:protocols` option to configure accepted protocols.