Method: PureValidator::ValidationErrors#add_all
- Defined in:
- lib/pure_validator/validation_errors.rb
#add_all(attribute, errors) ⇒ Object
Adds messages to the error messages on attribute.
errors.add(:name, ['is invalid', 'must present'])
# => ["is invalid", "must present"]
189 190 191 192 |
# File 'lib/pure_validator/validation_errors.rb', line 189 def add_all(attribute, errors) [attribute] ||= [] [attribute] += errors end |