aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/validations/presence.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/validations/presence.rb')
-rw-r--r--activerecord/lib/active_record/validations/presence.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/validations/presence.rb b/activerecord/lib/active_record/validations/presence.rb
index 75d5bd5a35..a9b791397b 100644
--- a/activerecord/lib/active_record/validations/presence.rb
+++ b/activerecord/lib/active_record/validations/presence.rb
@@ -43,6 +43,10 @@ module ActiveRecord
# deletes the associated object, thus putting the parent object into an invalid
# state.
#
+ # NOTE: This validation will not fail while using it with an association
+ # if the latter was assigned but not valid. If you want to ensure that
+ # it is both present and valid, you also need to use +validates_associated+.
+ #
# Configuration options:
# * <tt>:message</tt> - A custom error message (default is: "can't be blank").
# * <tt>:on</tt> - Specifies the contexts where this validation is active.