Method: PureValidator::ValidationErrors#count

Defined in:
lib/pure_validator/validation_errors.rb

#countObject

Returns the number of error messages.

errors.add(:name, "can't be blank")
errors.count # => 1
errors.add(:name, "must be specified")
errors.count # => 2


134
135
136
# File 'lib/pure_validator/validation_errors.rb', line 134

def count
  to_a.size
end