[MAGNOLIA-1361] validation check for missing required field stops after first field Created: 08/Feb/07 Updated: 23/Jan/13 Resolved: 29/Feb/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | gui |
| Affects Version/s: | 3.0.1 |
| Fix Version/s: | 3.0.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris Miner | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| 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 |
|
If you mark more than one field in a dialog as required and enter empty values for all fields, only the first field is caught and reported as a problem to the user. It would be better to hightlight all invalid fields. |
| Comments |
| Comment by Chris Miner [ 08/Feb/07 ] |
|
The change to validate that should work on post as well as get. |
| Comment by Chris Miner [ 08/Feb/07 ] |
|
patch to dilalog box that renders invalid box labels with extra css tag flagging them invalid. |
| Comment by Chris Miner [ 08/Feb/07 ] |
|
the patch to the css constants that includes the new invalid field css class type string. |
| Comment by Chris Miner [ 08/Feb/07 ] |
|
the css which makes invalid fields read. |
| Comment by Chris Miner [ 08/Feb/07 ] |
|
Hopefully these changes suffice for http://jira.magnolia.info/browse/MAGNOLIA-1119 as well. No problems with localization, the alert panel goes away, multiple invalid fields are shown at once. I think this is probably more like one might expect from the ability to make a dialog field required. Would be nice to show a per field error message, and extend the model to include min and max field lengths, and finally have it all run on the client side. |
| Comment by Chris Miner [ 09/Feb/07 ] |
|
The css didn't work in both the 1Col and 2Col box type layouts. Here's an update version that together with a followoing updated dialogs.css.patch does work in both cases. |
| Comment by Chris Miner [ 09/Feb/07 ] |
|
the updated css. |
| Comment by Chris Miner [ 09/Feb/07 ] |
|
One problem with this solution is that if required fields are in a tab that is not open, the user doesn't get to see the red highlighted field. |
| Comment by Boris Kraft [ 09/Feb/07 ] |
|
Also you will want to think about when to show the messages - I have seen lousy implementations that were more annoying than useful for the end user. |
| Comment by Chris Miner [ 12/Feb/07 ] |
|
I presume you meant that that fields shouldn't initially be red? |
| Comment by Chris Miner [ 12/Feb/07 ] |
|
This fixes validation for DialogFile fields. |
| Comment by Chris Miner [ 14/Feb/07 ] |
|
replacement for the previous DialogFile patch. |
| Comment by Chris Miner [ 14/Feb/07 ] |
|
yet another version. This one takes into account that a file may not be part of the form submit but may already be stored, and that it may be being removed and not replaced. |
| Comment by Magnolia International [ 28/Feb/07 ] |
|
Just a remark about "have it all run on the client side" : that's a no go. Client side validation is a possible bonus, but nothing else. It's out of the question that validation does not happen on the server: that would mean that it would suffice to disable js (or to forge http requests) to completely bypass validation |
| Comment by Magnolia International [ 01/Mar/07 ] |
|
One of the problems with these patches is that the validation code was called during rendering: as a result mandatory fields were immediately marked "red", and the user did not have any indication of what was wrong anymore after a failed validation, since nothing changed visually. It also removed the alert box, which while not being the most sexy device was a way of saying to the user that something was wrong. (if the missing required field was in another tab, the user would just see nothing) Another problem is that a file control would loose its file upon failed validation and the user would thus have to reselect and reupload it. while that's viable with simple dialogs, it is not in more complex scenarios where multiple files are involved. Postponing until the file issue can be properly resolved. |
| Comment by Magnolia International [ 01/Mar/07 ] |
|
Superseded by |
| Comment by Jan Haderka [ 29/Feb/08 ] |
|
removed spam from comments |