| Class | Sequel::Model::Validation::Errors |
| In: |
lib/sequel_model/validations.rb
|
| Parent: | ::Hash |
Validation::Errors represents validation errors, a simple hash subclass with a few convenience methods.
Adds an error for the given attribute.
# File lib/sequel_model/validations.rb, line 18
18: def add(att, msg)
19: self[att] << msg
20: end
Return the total number of error messages.
# File lib/sequel_model/validations.rb, line 23
23: def count
24: full_messages.length
25: end