Class: ValidatesStructure::Validator::NotBlankValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- ValidatesStructure::Validator::NotBlankValidator
- Defined in:
- lib/validates-structure.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
152 153 154 155 156 |
# File 'lib/validates-structure.rb', line 152 def validate_each(record, attribute, value) if value.blank? record.errors.add attribute, "must not be empty" end end |