You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, if the ActionType is "user" then, the Person struct fields are mandatory; otherwise, the Address struct fields are mandatory.
I tried with these tags, but when I send an address-type request, it says "Person.ID is required", while I mentioned required_without=Address for the Person struct.
Would you please guide me on how to address this issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have a data structure that needs validation based on values of the
ActionType
field.For example, if the
ActionType
is "user" then, thePerson
struct fields are mandatory; otherwise, theAddress
struct fields are mandatory.I tried with these tags, but when I send an address-type request, it says
"Person.ID is required"
, while I mentionedrequired_without=Address
for the Person struct.Would you please guide me on how to address this issue?
Beta Was this translation helpful? Give feedback.
All reactions