Sha256: 2804117f5abaa4e50cb222056b77ca6f8f23f66823b5a4c76f467b8766ba35a0
Contents?: true
Size: 336 Bytes
Versions: 6
Compression:
Stored size: 336 Bytes
Contents
module CopyleaksApi module Validators class UrlValidator class << self # raises error if given url for callback is invalid def validate!(url) raise BadUrlError.new(url) unless url =~ %r(^(https?://)?([\da-z\.-]+)\.([a-z\.]{2,6})([/\w \.-]*)*/?$) end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems