diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 8c9ff437d7..f1dbe7faee 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -451,7 +451,8 @@ module ActiveRecord # * on - Specifies when this validation is active (default is :save, other options :create, :update) # * allow_nil - Skip validation if attribute is nil. (default is true) # * accept - Specifies value that is considered accepted. The default value is a string "1", which - # makes it easy to relate to an HTML checkbox. + # makes it easy to relate to an HTML checkbox. This should be set to 'true' if you are validating a database + # column, since the attribute is typecast from "1" to true before validation. # * if - Specifies a method, proc or string to call to determine if the validation should # occur (e.g. :if => :allow_validation, or :if => Proc.new { |user| user.signup_step > 2 }). The # method, proc or string should return or evaluate to a true or false value.