Minimal change required to show all validation errors for all required fields#7
Open
macie-korte wants to merge 3 commits intodealertrack:masterfrom
Open
Minimal change required to show all validation errors for all required fields#7macie-korte wants to merge 3 commits intodealertrack:masterfrom
macie-korte wants to merge 3 commits intodealertrack:masterfrom
Conversation
…d fields instead of only a small subset.
Contributor
There was a problem hiding this comment.
how does this help? the original conditions are more strict when validating fields
Contributor
There was a problem hiding this comment.
now it makes sense. you want to bypass the DRF field validations in order to force form validations to kick in. better place for that would be to add an option in the Meta which will force the serializer to not include any DRF fields and will force validation to happen in the form.
places to look in the code:
FormSerializerBase.get_fields
FormSerializerOptions
update my fork to the latest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minimal change required to show all validation errors for all required fields instead of only a small subset.
I know you will probably not want this change as-is, I am opening this PR only to demonstrate what change was needed to make the desired behavior work for me.