Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(ObjectControl): hotfix nested object validation #7385

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

demshy
Copy link
Member

@demshy demshy commented Jan 30, 2025

Summary

This a quick patch for #7383 that happened after the validation rework in #7374

I have tested against most of the cases that I could think of and it seems to be ok.

Test plan

This is the config that I tested with, changing required on/off and trying multiple nested depths

{name: pageHero, label: Page hero, widget: object, collapsed: true, summary: '{{fields.title}}', fields: [
      {name: title, widget: string, i18n: true, required: false, hint: 'if empty, page title will be used'},
      {name: description, widget: string, i18n: true, required: false, hint: 'if empty, page description will be used'},
      {name: button, widget: object, i18n: true, fields: [
        {name: text, widget: string, i18n: true, required: false},
        {name: href, widget: string, i18n: true, required: false},
      ]},
    ]}

Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)
No time for the cute picture this time

@demshy demshy requested a review from a team as a code owner January 30, 2025 10:15
@demshy
Copy link
Member Author

demshy commented Jan 30, 2025

This should be followed by a PR with e2e tests for this feature.

@demshy demshy merged commit 3f5461c into decaporg:main Jan 30, 2025
9 checks passed
@demshy demshy deleted the fix/nested-object-validation branch January 30, 2025 10:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants