--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if <tt>only_integer</tt> is false) or applying it to the regular expression <tt>/\A[+\-]?\d+\Z/</tt> (if <tt>only_integer</tt> is set to true).
- !ruby/struct:SM::Flow::VERB 
  body: "  class Person &lt; ActiveRecord::Base\n    validates_numericality_of :value, :on =&gt; :create\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "Configuration options:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "<tt>:message</tt> - A custom error message (default is: &quot;is not a number&quot;)."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:only_integer</tt> - Specifies whether the value has to be an integer, e.g. an integral value (default is <tt>false</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:allow_nil</tt> - Skip validation if attribute is <tt>nil</tt> (default is <tt>false</tt>). Notice that for fixnum and float columns empty strings are converted to <tt>nil</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:greater_than</tt> - Specifies the value must be greater than the supplied value.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:greater_than_or_equal_to</tt> - Specifies the value must be greater than or equal the supplied value.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:equal_to</tt> - Specifies the value must be equal to the supplied value.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:less_than</tt> - Specifies the value must be less than the supplied value.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:less_than_or_equal_to</tt> - Specifies the value must be less than or equal the supplied value.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:odd</tt> - Specifies the value must be an odd number.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:even</tt> - Specifies the value must be an even number.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should occur (e.g. <tt>:if =&gt; :allow_validation</tt>, or <tt>:if =&gt; Proc.new { |user| user.signup_step &gt; 2 }</tt>). The method, proc or string should return or evaluate to a true or false value.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should not occur (e.g. <tt>:unless =&gt; :skip_validation</tt>, or <tt>:unless =&gt; Proc.new { |user| user.signup_step &lt;= 2 }</tt>). The method, proc or string should return or evaluate to a true or false value.
  type: :BULLET
full_name: ActiveRecord::Validations::ClassMethods#validates_numericality_of
is_singleton: false
name: validates_numericality_of
params: (*attr_names)
visibility: public
