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:
Diffstat (limited to 'app/validators/gitlab/utils/zoom_url_validator.rb')
-rw-r--r--app/validators/gitlab/utils/zoom_url_validator.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/app/validators/gitlab/utils/zoom_url_validator.rb b/app/validators/gitlab/utils/zoom_url_validator.rb
deleted file mode 100644
index 57e30dcefa6..00000000000
--- a/app/validators/gitlab/utils/zoom_url_validator.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-# Gitlab::Utils::ZoomUrlValidator
-#
-# Custom validator for zoom urls
-#
-module Gitlab
- module Utils
- class ZoomUrlValidator < ActiveModel::EachValidator
- ALLOWED_SCHEMES = %w(https).freeze
-
- def validate_each(record, attribute, value)
- links_count = Gitlab::ZoomLinkExtractor.new(value).links.size
- valid = Gitlab::UrlSanitizer.valid?(value, allowed_schemes: ALLOWED_SCHEMES)
-
- return if links_count == 1 && valid
-
- record.errors.add(:url, 'must contain one valid Zoom URL')
- end
- end
- end
-end