mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Active Model: Messages for strict validation always convert attributes to human readable form [ci skip]
This commit is contained in:
parent
7b37e3edaf
commit
707b5c00ab
1 changed files with 2 additions and 2 deletions
|
@ -310,9 +310,9 @@ module ActiveModel
|
|||
# <tt>:strict</tt> option can also be set to any other exception.
|
||||
#
|
||||
# person.errors.add(:name, :invalid, strict: true)
|
||||
# # => ActiveModel::StrictValidationFailed: name is invalid
|
||||
# # => ActiveModel::StrictValidationFailed: Name is invalid
|
||||
# person.errors.add(:name, :invalid, strict: NameIsInvalid)
|
||||
# # => NameIsInvalid: name is invalid
|
||||
# # => NameIsInvalid: Name is invalid
|
||||
#
|
||||
# person.errors.messages # => {}
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue