Class: Fluffery::Forms::Validation::MessageBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/fluffery/forms/validation/base.rb

Class Method Summary collapse

Class Method Details

.message_for(object, attribute, validator) ⇒ Object



107
108
109
110
111
# File 'lib/fluffery/forms/validation/base.rb', line 107

def self.message_for(object, attribute, validator)
  message = self.get_validation_message(validator)
  message = self.defaults(validator.kind) unless message.match(/translation missing/i).nil?
  message
end