aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/format.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-02-21 11:37:08 +0100
committerXavier Noria <fxn@hashref.com>2011-02-21 11:37:08 +0100
commitb481574a33764e2db1caf01c233a9c9ac9723780 (patch)
treeff621c47d30cc38f9d6cfeec2bb9188b5f8b7ebf /activemodel/lib/active_model/validations/format.rb
parent9297027e082c69e590fc090132cee495ce0fc4b1 (diff)
downloadrails-b481574a33764e2db1caf01c233a9c9ac9723780.tar.gz
rails-b481574a33764e2db1caf01c233a9c9ac9723780.tar.bz2
rails-b481574a33764e2db1caf01c233a9c9ac9723780.zip
copy-edits 8d96b89
Diffstat (limited to 'activemodel/lib/active_model/validations/format.rb')
-rw-r--r--activemodel/lib/active_model/validations/format.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb
index ca8920bce6..541f53a834 100644
--- a/activemodel/lib/active_model/validations/format.rb
+++ b/activemodel/lib/active_model/validations/format.rb
@@ -51,7 +51,9 @@ module ActiveModel
# * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
# * <tt>:with</tt> - Regular expression that if the attribute matches will result in a successful validation.
# * <tt>:without</tt> - Regular expression that if the attribute does not match will result in a successful validation.
- # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>nil</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
+ # * <tt>:on</tt> - Specifies when this validation is active. Runs in all
+ # validation contexts by default (+nil+), other options are <tt>:create</tt>
+ # and <tt>:update</tt>.
# * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
# occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
# method, proc or string should return or evaluate to a true or false value.