Module: CertWatch::Sanitize

Extended by:
Sanitize
Included in:
Sanitize
Defined in:
lib/cert_watch/sanitize.rb

Defined Under Namespace

Classes: ForbiddenCharacters

Instance Method Summary collapse

Instance Method Details

#check_domain!(name) ⇒ Object


7
8
9
10
11
# File 'lib/cert_watch/sanitize.rb', line 7

def check_domain!(name)
  if name =~ /[^0-9a-zA-Z.-]/
    fail(ForbiddenCharacters, "Domain '#{name}' contains forbidden characters.")
  end
end