aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-01-26 05:08:20 +0000
committerMichael Koziarski <michael@koziarski.com>2008-01-26 05:08:20 +0000
commit176abc842c43fc803d41efa429456a2ea8e7296d (patch)
tree911be28379532178d54c0ece99830553a4dae83a /activerecord/lib/active_record
parent8ef3dfff7a48bd0609ba4067c54910880fc6ef88 (diff)
downloadrails-176abc842c43fc803d41efa429456a2ea8e7296d.tar.gz
rails-176abc842c43fc803d41efa429456a2ea8e7296d.tar.bz2
rails-176abc842c43fc803d41efa429456a2ea8e7296d.zip
Add tests and documentation for allow_blank. Closes #10651 [blj]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/validations.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index 87f128e9a3..7770d805b1 100755
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -684,6 +684,8 @@ module ActiveRecord
#
# Configuration options:
# * <tt>message</tt> - A custom error message (default is: "is invalid")
+ # * <tt>allow_nil</tt> - If set to true, skips this validation if the attribute is null (default is: false)
+ # * <tt>allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is: false)
# * <tt>with</tt> - The regular expression used to validate the format with (note: must be supplied!)
# * <tt>on</tt> Specifies when this validation is active (default is :save, other options :create, :update)
# * <tt>if</tt> - Specifies a method, proc or string to call to determine if the validation should