Class | AWS::Record::NumericalityValidator |
In: |
lib/aws/record/validators/numericality.rb
|
Parent: | Validator |
@api private
ACCEPTED_OPTIONS | = | [ :greater_than, :greater_than_or_equal_to, :less_than, :less_than_or_equal_to, :equal_to, :only_integer, :odd, :even, :message, :allow_nil, :allow_blank, :on, :if, :unless, ] |
COMPARISONS | = | { :equal_to => :==, :greater_than => :>, :greater_than_or_equal_to => :>=, :less_than => :<, :less_than_or_equal_to => :<=, :even => lambda{|value| value.to_i % 2 == 0 }, :odd => lambda{|value| value.to_i % 2 == 1 }, } |