From 176abc842c43fc803d41efa429456a2ea8e7296d Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 26 Jan 2008 05:08:20 +0000 Subject: 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 --- activerecord/lib/active_record/validations.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/lib/active_record') 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: # * message - A custom error message (default is: "is invalid") + # * allow_nil - If set to true, skips this validation if the attribute is null (default is: false) + # * allow_blank - If set to true, skips this validation if the attribute is blank (default is: false) # * with - The regular expression used to validate the format with (note: must be supplied!) # * on Specifies when this validation is active (default is :save, other options :create, :update) # * if - Specifies a method, proc or string to call to determine if the validation should -- cgit v1.2.3