mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Change 'validates_presence_of' to 'presence: true'
Of course validates_presence_of is still working but it is not explained in the guide, I think consequently should use 'presence: true' in this documentation.
This commit is contained in:
parent
1655f4142e
commit
ffde34d510
1 changed files with 1 additions and 1 deletions
|
@ -434,7 +434,7 @@ end
|
||||||
|
|
||||||
Note that the default error messages are plural (e.g., "is too short (minimum
|
Note that the default error messages are plural (e.g., "is too short (minimum
|
||||||
is %{count} characters)"). For this reason, when `:minimum` is 1 you should
|
is %{count} characters)"). For this reason, when `:minimum` is 1 you should
|
||||||
provide a personalized message or use `validates_presence_of` instead. When
|
provide a personalized message or use `presence: true` instead. When
|
||||||
`:in` or `:within` have a lower limit of 1, you should either provide a
|
`:in` or `:within` have a lower limit of 1, you should either provide a
|
||||||
personalized message or call `presence` prior to `length`.
|
personalized message or call `presence` prior to `length`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue