Sha256: 5faa8c51e75105a0ed91bbd391070f84a7ff773e89f31bca0d28c661e96a15a2

Contents?: true

Size: 224 Bytes

Versions: 9

Compression:

Stored size: 224 Bytes

Contents

class EffectiveAddressValidValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    if value.present? && value.valid? == false
      record.errors[attribute] << 'is invalid'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
effective_addresses-1.2.0 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.1.0 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.6 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.5 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.4 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.3 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.2 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.1 app/models/validators/effective_address_valid_validator.rb
effective_addresses-1.0.0 app/models/validators/effective_address_valid_validator.rb