diff options
Diffstat (limited to 'app/models/integrations/datadog.rb')
-rw-r--r-- | app/models/integrations/datadog.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/integrations/datadog.rb b/app/models/integrations/datadog.rb index ab0fdbd777f..d4867600853 100644 --- a/app/models/integrations/datadog.rb +++ b/app/models/integrations/datadog.rb @@ -91,7 +91,7 @@ module Integrations with_options if: :activated? do validates :api_key, presence: true, format: { with: /\A\w+\z/ } - validates :datadog_site, format: { with: /\A[\w\.]+\z/, allow_blank: true } + validates :datadog_site, format: { with: %r{\A\w+([-.]\w+)*\.[a-zA-Z]{2,5}(:[0-9]{1,5})?\z}, allow_blank: true } validates :api_url, public_url: { allow_blank: true } validates :datadog_site, presence: true, unless: -> (obj) { obj.api_url.present? } validates :api_url, presence: true, unless: -> (obj) { obj.datadog_site.present? } |