Skip to content

number_not_multiple

Value is not an exact multiple of :multiple-of.

:multiple-of N in a (numeric-bounds …) block says the value must divide evenly by N. It is the alignment constraint a range and an integrality flag cannot express between them: a byte offset that must land on a 256-byte boundary is not “between 0 and X” and not merely “an integer”, it is a multiple of 256.

Three checks run in order, and only the first failure is reported. So 250.5 under :integer true :multiple-of 4 is number_not_integer, -256 under :min 0 :multiple-of 256 is number_below_min, and you see this code only once the value is otherwise acceptable. Fix the reported problem and re-run; a second one may be waiting.

Divisibility is decided in exact integer space whenever the value and the divisor are both whole numbers, so a value above 2^53 answers correctly rather than being rounded first. A fractional divisor (:multiple-of 0.25) is compared with a small tolerance instead, because binary floating point has no exact answer there, and the schema author is warned about it at the declaration. Alignment rules use whole divisors, so this caveat rarely applies in practice.

Negative values are fine: -512 is a multiple of 256. If the divisor carries a unit, the value must carry a byte-equal one, the same rule :min and :max follow.


Run sjon explain number_not_multiple to read this at a terminal, browse every code, or work through diagnostics-driven repair if you want the habit rather than the answer.