Sha256: 1ecbfe492109fb4c19d070c605c6c01856b0d193c32cabc5931ff0519cbe4858

Contents?: true

Size: 319 Bytes

Versions: 41

Compression:

Stored size: 319 Bytes

Contents

# frozen_string_literal: true

class MiniDefender::Rules::Present < MiniDefender::Rule
  def self.signature
    'present'
  end

  def implicit?(validator)
    true
  end

  def passes?(attribute, value, validator)
    true
  end

  def message(attribute, value, validator)
    "The field should be present."
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
mini_defender-0.6.8 lib/mini_defender/rules/present.rb
mini_defender-0.6.7 lib/mini_defender/rules/present.rb
mini_defender-0.6.5 lib/mini_defender/rules/present.rb
mini_defender-0.6.4 lib/mini_defender/rules/present.rb
mini_defender-0.6.3 lib/mini_defender/rules/present.rb
mini_defender-0.6.2 lib/mini_defender/rules/present.rb
mini_defender-0.6.1 lib/mini_defender/rules/present.rb
mini_defender-0.6.0 lib/mini_defender/rules/present.rb
mini_defender-0.5.8 lib/mini_defender/rules/present.rb
mini_defender-0.5.7 lib/mini_defender/rules/present.rb
mini_defender-0.5.6 lib/mini_defender/rules/present.rb
mini_defender-0.5.5 lib/mini_defender/rules/present.rb
mini_defender-0.5.4 lib/mini_defender/rules/present.rb
mini_defender-0.5.3 lib/mini_defender/rules/present.rb
mini_defender-0.5.2 lib/mini_defender/rules/present.rb
mini_defender-0.5.1 lib/mini_defender/rules/present.rb
mini_defender-0.5.0 lib/mini_defender/rules/present.rb
mini_defender-0.4.1 lib/mini_defender/rules/present.rb
mini_defender-0.4.0 lib/mini_defender/rules/present.rb
mini_defender-0.3.14 lib/mini_defender/rules/present.rb