-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
Description
nullValueis mutually exclusive withpresence = required/constant.
presence=requiresis mutually exclusive withnullValue
My understanding of that phrase is that having a nullValue attribute automatically makes field optional. This can hardly be correct because nullValue is not a valid value for a required field so it actually needs this attribute to check its value, in other words, nullValue is NOT mutually exclusive with required/optional. Is it correct and documentation is wrong here?
- The same page says that
presence=constantis mutually exclusive withmin/max/nullValue. Does it mean that no constraints are applied to constant values? For example is it legal to have constant255foruint8type? Because forrequiredtypesnullValueis not a valid value.
- Is it allowed to customize
min/max/nullValuefor floating point types? I suspect that yes, just want to be sure. The real question: isNaNliteral supported? I mean, can I write<type name="MyDouble" primitiveType="double" maxValue="100" nullValue="NaN"/>? No hint about it in the documentation.