Method: PureValidator::ValidationErrors#full_messages
- Defined in:
- lib/pure_validator/validation_errors.rb
#full_messages ⇒ Object
Returns all the full error messages in an array.
class PersonValidator
validates :name, :address, :email, presence: true
validates :name, length: { min: 5, max: 30 }
end
= create(address: '123 First St.')
errors.
# => ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Email can't be blank"]
213 214 215 |
# File 'lib/pure_validator/validation_errors.rb', line 213 def .map { |attribute, | (attribute, ) } end |