def infer_type_validation_for(property, options)
return if property.custom?
if property.kind_of?(Property::Numeric)
options[:gte] = property.min if property.min
options[:lte] = property.max if property.max
end
if Integer == property.primitive
options[:integer_only] = true
validates_numericality_of property.name, options_with_message(options, property, :is_number)
elsif BigDecimal == property.primitive || Float == property.primitive
options[:precision] = property.precision
options[:scale] = property.scale
validates_numericality_of property.name, options_with_message(options, property, :is_number)
else
validates_primitive_type_of property.name, options_with_message(options, property, :is_primitive)
end
end