[MGNLUI-4025] Total Dialog Validation Error Messages and Total Figure Not Synchronised Created: 23/Sep/16 Updated: 08/Mar/21 Resolved: 08/Mar/21 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | dialogs |
| Affects Version/s: | 5.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | OLD Chris Jennings (Malleus) (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
This may be timely as I see MGNLUI-2542 has been looked at in June. I have attempted to build a system for cross-field validation ensuring that two or more fields contain distinct values. I have found that error messages are shown to the user when there is a value returned from AbstractField.getErrorMessage() but the total errors in the dialog header is calculated by re-running isValid on each item - this happens within info.magnolia.ui.vaadin.form.Form.isValid(). In my case, this means that a field that was valid when first evaluated but becomes invalid because of a clash will not show an error message but will be counted in the total. This results in a user being told there are X errors but only seeing X-1 messages. I believe the process should be tightened to ensure the numbers remain the same. For my particular case, I would prefer to see the error messages counted by examining the response from getErrorMessage() ie. Ignoring the first field to contain a duplicated value because it was valid. However, I understand that the other route may be desirable: call isValid() and only call getErrorMessage() if the response is false. Further notes on my project are available at: https://github.com/malleusconsulting/uniqueness-validator-module#issues-and-limitations |
| Comments |
| Comment by Roman Kovařík [ 08/Mar/21 ] |
|
Closing as the new framework doesn't show number of errors. |