getDefaultFormState includeUndefinedValues #2742
Unanswered
dieseldjango
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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