Class: SexyValidations::Validators::Presence

Inherits:
Object
  • Object
show all
Defined in:
lib/sexy_validations/validators/presence.rb

Class Method Summary collapse

Class Method Details

.validate(model, attribute, value, options) ⇒ Object



5
6
7
8
9
# File 'lib/sexy_validations/validators/presence.rb', line 5

def self.validate(model, attribute, value, options)
  return unless value.blank?

  model.errors.add(attribute, "muss ausgefüllt werden")
end