Fix error messages mismatch when creating items#26229
Merged
AlexGaillard merged 10 commits intodirectus:mainfrom Nov 21, 2025
Merged
Fix error messages mismatch when creating items#26229AlexGaillard merged 10 commits intodirectus:mainfrom
AlexGaillard merged 10 commits intodirectus:mainfrom
Conversation
3758fb8 to
4dca996
Compare
formfcw
approved these changes
Nov 20, 2025
Contributor
formfcw
left a comment
There was a problem hiding this comment.
Thank you so much @johnson-jnr ❤️ for your first contribution 🚀
@gaetansenn Thank you for adding tests 🙏
LGTM 🎉
Contributor
Author
|
@formfcw I'm glad to have made my first contribution, and thanks to @gaetansenn for the help. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Scope
What's changed:
validation-errorscomponent, prop values were passed directly touseValidationErrorDetailsusing toRef.toRef(props.validationErrors)doesn’t keep the prop value properly synchronised.Potential Risks / Drawbacks
Tested Scenarios
Review Notes
toRef(props, 'validationErrors')also works.Questions
In a case where you have both required and non-required fields in a form, and you submit the form with any of the required fields empty and non-required fields filled with invalid values. The validation errors appear only for the required values. Errors for non-required fields appear only when the required fields are also filled and submitted.
From my investigation, this is because required fields are validated immediately on the client side, but for non-required fields, the request goes to the server first, and if any, the validation errors are returned. This works fine, except that the user would not see all errors at once in a case like this.
Note, this PR does not address this issue. If this is how it is expected to work, then this PR addresses all the bugs raised in the issue.
Checklist
Fixes #26227