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
I'm looking into #2708, which involves pruning empty nested objects from the form data before submitting for validation. There's a includeUndefinedValues parameter to the getDefaultFormState() function that is set to true only when getting data to validate. This seems to ensure that all properties are created in the data with undefined values, rather than just leaving them off.
I'm sure it was put there for a reason, but I don't get why this is necessary. Obviously for what I'm doing I want to do basically the opposite - leave empty values off of the data when validating. Can any one shed some light on this?
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
-
I'm looking into #2708, which involves pruning empty nested objects from the form data before submitting for validation. There's a
includeUndefinedValues
parameter to thegetDefaultFormState()
function that is set totrue
only when getting data to validate. This seems to ensure that all properties are created in the data with undefined values, rather than just leaving them off.I'm sure it was put there for a reason, but I don't get why this is necessary. Obviously for what I'm doing I want to do basically the opposite - leave empty values off of the data when validating. Can any one shed some light on this?
Beta Was this translation helpful? Give feedback.
All reactions