MultipleOfRule class final

Validates that a numeric value is a multiple of the schema-declared divisor.

Corresponds to multipleOf in JSON Schema spec §6.2.1. Non-numeric instances are silently skipped. Uses a floating-point-safe algorithm: divides the value by the divisor and checks whether the quotient is within an epsilon of a whole number. The naive value % divisor == 0 check fails for decimal divisors (e.g. 0.3 % 0.1 ≠ 0 in IEEE-754 arithmetic).

Inheritance

Constructors

MultipleOfRule(num divisor)
Creates a rule that requires values to be a multiple of divisor.
const

Properties

divisor num
The required divisor.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(dynamic value, String path) List<SchemaViolation>
Validates value at path and returns every violation found.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited