divisibleBy

4 views
Skip to first unread message

Kris Zyp

unread,
Dec 8, 2009, 11:34:01 PM12/8/09
to json-...@googlegroups.com
What do you think about having a "divisibleBy" attribute instead of
"maxDecimal"? An instance value would need to be divisible by the value
provided in the "divisibleBy" schema attribute (if provided) in order to
be valid. This seems like it would superset the functionality of
"maxDecimal".
Kris

Hatem Nassrat

unread,
Dec 8, 2009, 11:40:55 PM12/8/09
to json-...@googlegroups.com
Excuse my ignorance, but I don't really get it. So if we want a max of
two decimal places would divisbleBy = 100, but to me divisbleBy means
the numbers must divideBy that number leaving no remainder. For
example divisbleBy = 7 would mean I only accept multiples of 7, e.g.
-7, 0, 7, 14, ... Basically I am quite confused.

--
Hatem Nassrat

Kris Zyp

unread,
Dec 9, 2009, 9:39:45 AM12/9/09
to json-...@googlegroups.com
It means what you think, but if you want two decimal places, you have to
set divisableBy to 0.01.
Kris

Reply all
Reply to author
Forward
0 new messages