class BazaModels::Validators::PresenceValidator
Public Instance Methods
validate(model, value)
click to toggle source
# File lib/baza_models/validators/presence_validator.rb, line 2 def validate(model, value) model.errors.add(attribute_name, "cannot be blank") if value.to_s.strip.empty? end