Method: JSONSchemer::Draft202012::Vocab::Validation::MultipleOf#validate
- Defined in:
- lib/json_schemer/draft202012/vocab/validation.rb
permalink #validate(instance, instance_location, keyword_location, _context) ⇒ Object
[View source]
90 91 92 |
# File 'lib/json_schemer/draft202012/vocab/validation.rb', line 90 def validate(instance, instance_location, keyword_location, _context) result(instance, instance_location, keyword_location, !instance.is_a?(Numeric) || BigDecimal(instance.to_s).modulo(value).zero?) end |