Replies: 2 comments 2 replies
-
This kind of "business logic" must be implemented by the I actually don't have any good idea on how to implement this. Maybe you have a better idea. |
Beta Was this translation helpful? Give feedback.
-
Recently I added the optional attribute |
Beta Was this translation helpful? Give feedback.
-
I have some conditionally hidden fieldsets, but fields within them are required. When the form is submitted, validation fails.
The same thing happens in the docs. With the "I'm not a customer" checkbox selected, the response comes back with a validation error complaining about a hidden missing required field:
I was hoping the library would automatically validate empty fields in hidden forms but that doesn't seem to be the case. What's the best way of handling this? Are we to just implement a custom
full_clean()
method on forms allowing empty hidden required fields, or is there another way or an integrated feature I'm missing?Thanks
Beta Was this translation helpful? Give feedback.
All reactions