Skip to content

fix(validation): backport custom schema error messages to v4.36 (#4390) - #4400

Merged
olemartinorg merged 2 commits into
release/v4.36from
codex/backport-4390-v4.36
Oct 29, 2026
Merged

olemartinorg merged 2 commits into
release/v4.36from
codex/backport-4390-v4.36

Conversation

@olemartinorg

Copy link
Copy Markdown
Contributor

Description

Backport #4390 to release/v4.36.

Fields in definitions containing nested references now display their configured custom validation messages instead of the generic message. AJV's failing schema is used directly, preserving support for older data models and subschema validation.

The aggregate patch is unchanged from merged commit 289916014a6b0d8cdcff0d3fb48d93b6d4323310.

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
  • Automated tests
    • Unit test(s) have been added/updated
  • UU/WCAG
    • No testing done/necessary (no DOM/visual changes)
  • User documentation
    • Backport of the existing validation bugfix; no documentation changes included.
  • Support in Altinn Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • Not changed by this backport.
  • Labels
    • Not changed by this backport.

Use AJV's parentSchema so fields in definitions containing nested references
show their configured error messages. Subschema selection and support for
older data models remain unchanged.

Backport the implementation from #4390 to release/v4.36.
Source commit: 2899160
Cover custom messages on root properties, referenced definitions, nested
references, and legacy subschema validation to prevent the lookup bug
from returning.

Backport the regression tests from #4390 to release/v4.36.
Source commit: 2899160
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d54012ae-1fd9-48b5-b143-31fed21a1ef2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@olemartinorg olemartinorg added kind/bug Something isn't working backport-ignore This PR is a new feature and should not be cherry-picked onto release branches approve You approve this PR. Use when: - Small changes - Already agreed upon - Async review labels Oct 29, 2026
@olemartinorg
olemartinorg merged commit ea61ecd into release/v4.36 Oct 29, 2026
18 of 21 checks passed
@olemartinorg
olemartinorg deleted the codex/backport-4390-v4.36 branch October 29, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approve You approve this PR. Use when: - Small changes - Already agreed upon - Async review backport-ignore This PR is a new feature and should not be cherry-picked onto release branches kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants