Sha256: d1b345df941145f04c8743e2fa4510dea0b0c6a3bd9a29c795926d3eea904e72

Contents?: true

Size: 200 Bytes

Versions: 6

Compression:

Stored size: 200 Bytes

Contents

class AbsenceValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    record.errors.add attribute, (options[:message] || "must be blank") unless value.blank?
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rules-1.1.1 lib/rules/extensions/active_model/absence_validator.rb
rules-1.1.0 lib/rules/extensions/active_model/absence_validator.rb
rules-1.0.0 lib/rules/extensions/active_model/absence_validator.rb
rules-0.1.2 lib/rules/extensions/active_model/absence_validator.rb
rules-0.1.1 lib/rules/extensions/active_model/absence_validator.rb
rules-0.1.0 lib/rules/extensions/active_model/absence_validator.rb