-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue with multiple server-validation errors #2444
Fix for issue with multiple server-validation errors #2444
Conversation
Hi @enkelmedia, very cool. Feel free to extend the example if you think it is a good way for others to learn about the system. :-) Please let me know when you think its ready then :-) |
src/packages/core/validation/controllers/bind-server-validation-to-form-control.controller.ts
Outdated
Show resolved
Hide resolved
(cherry picked from commit 207dd3e55c8b965ce688057efc36b1594f98f92d)
@nielslyngsoe I've updated the PR with the changes that you purposes and also pushed a cleaned up example with tabs. |
@nielslyngsoe would be nice if you could have a look at this, let me know if you need any changes. |
revert observeSymbol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really cool, thanks
Hi there @enkelmedia! First of all: A big #H5YR for making an Umbraco related contribution during Hacktoberfest! We are very thankful for the huge amount of PRs submitted, and all the amazing work you've been doing 🥇 Due to the amazing work you and others in the community have been doing, we've had a bit of a hard time keeping up. 😅 While all of the PRs for Hacktoberfest might not have been merged yet, you still qualify for receiving some Umbraco swag, congratulations! 🎉 In the spirit of Hacktoberfest we've prepared some exclusive Umbraco swag for all our contributors - including you! As an alternative choice, you can opt-out of receiving anything and ask us to help improve the planet instead by planting a tree on your behalf. 🌳 Receive your swag or plant a tree! 👈 Please follow this link to fill out and submit the form, before December 25nd, 2024, 23:59:00 UTC. Following this date we'll be sending out all the swag, but please note that it might not reach your doorstep for a few weeks/months, so please bear with us and be patient 🙏 The only thing left to say is thank you so much for participating in Hacktoberfest! We really appreciate the help! Kind regards, |
Fixes issue outlined here: umbraco/Umbraco-CMS#17231
Description
This PR removes the constants used in the controller since this would prevent individual controllers for each field in a form. Before this change only one element (the last) in a form could be populated with a server validation error.
After moving/removing the constants each field not gets a unique binding and errors work as expected.
Before this change
In this example, clicking the
Add server error
-button will add two errors to the context - one for each field. Only the last field shows the error.After this change
After applying the change, both of the fields show the error and resetting them by changing the value works.
Types of changes
Motivation and context
How to test?
Use the provided example.
Look in the Translation-section where there is a demo-dashboard.
Checklist