Open
Description
nullValue
is mutually exclusive withpresence = required/constant
.
presence=requires
is 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=constant
is mutually exclusive withmin/max/nullValue
. Does it mean that no constraints are applied to constant values? For example is it legal to have constant255
foruint8
type? Because forrequired
typesnullValue
is not a valid value.
- Is it allowed to customize
min/max/nullValue
for floating point types? I suspect that yes, just want to be sure. The real question: isNaN
literal supported? I mean, can I write<type name="MyDouble" primitiveType="double" maxValue="100" nullValue="NaN"/>
? No hint about it in the documentation.