Closed andersonba closed 9 years ago
hi. sorry for the late response. for some reason this question went under my radar...
I'm not sure how to solve this riddle. perhaps a "union type" can help. try placing the two optional fields inside a new child object and define that child using a union type with 2 schemas in it (one with only "creditcard" and one with only "token").
anyway, at this point I'm trying to avoid adding features that are not part of the standard. so I'm not going to add atLeastOne at this time.
I have object property in a schema that requires at least one property in the object.
See below:
I need to validate if the object has a creditcard OR token property, is required at least one but not simultaneous (XOR).
Is it possible? How?
May be atLeastOne attribute resolve this:
Thanks!