[MGNLUI-6406] Complex fields doesn't allow validators config anymore Created: 13/Nov/20 Updated: 12/Oct/23 Resolved: 06/Apr/22 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | 6.2.4 |
| Fix Version/s: | None |
| Type: | Epic | Priority: | Urgent |
| Reporter: | Jonathan Ayala | Assignee: | Unassigned |
| Resolution: | Workaround exists | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 0d | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: | |||||||||||||
| Epic Name: | formLevelValidation | ||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Date of First Response: | |||||||||||||
| Parent Link: |
|
||||||||||||
| Description |
|
Validators configuration is not posible for new 6UI complex fields such as info.magnolia.ui.field.MultiFieldDefinition and info.magnolia.ui.field.CompositeFieldDefinition. In 5UI they extend info.magnolia.ui.form.field.definition.ConfiguredFieldDefinition, which allows the usage of validators whereas in 6UI, they extend info.magnolia.ui.field.ConfiguredComplexPropertyDefinition, which does not contain the validators attribute. This is a problem for customers migrating forms to 6 UI which contain validators for such fields. |
| Comments |
| Comment by Richard Gange [ 30/Dec/20 ] |
I think in a lot of cases there might be another approach which could achieve the same goals without validation. Perhaps a different type of field with a configuration that prevents the need to even evaluate (for example MGNLUI-6485). Customers willing to change the design should ask support or comment for workaround ideas. |
| Comment by Mariusz Chruscielewski [ 01/Feb/21 ] |
|
I think a lot of people who upgrade, have already some data sets used on production, changing field type is not always possible. In our case we have a lot of multivalue fields that contain Select fields, but those select fields are custom, and they load (lazy) from database while typing. There is no other way to validate if this set contains duplicates, but use validator on multivalue field. |
| Comment by Roman Kovařík [ 01/Jul/21 ] |
|
Multi field validators use cases from linked support tickets/ comments:
Problems with exposing validator API on multi fields:
|