Sha256: c9ff7f7e0448909cb303dabd1e4427bb653653e33671c92f9b950a820b2cbce2
Contents?: true
Size: 468 Bytes
Versions: 12
Compression:
Stored size: 468 Bytes
Contents
module Vidibus module ValidateUri class UriValidator < ActiveModel::EachValidator include Vidibus::ValidateUri::Core def validate_each(record, attribute, value) if valid_uri?(value, options) if options[:accessible] == true and !accessible_uri?(value) record.errors.add(attribute, :inaccessible_uri) end else record.errors.add(attribute, :invalid_uri) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems