Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix issue where ui:title in anyOf/oneOf is not shown in error messages #4398

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chibacchie
Copy link
Contributor

Reasons for making this change

Fixed issue where ui:title in anyOf/oneOf is not shown in error messages.

This fixes #4368 with the following limitations.

  1. This is only applicable in the case missingProperty exists.
  2. As schemaPath is not stable (see ajv-validator/ajv#512), this may cause unexpected results occasionally.

As the first limitation is not directly related to #4368, it should be fixed in a separate PR if it is really an issue.

The second limitation can be a known issue as this fix does not lead any degradation and the problem only happens with nested $ref (i.e. happen in very limited cases).

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation error messages not using ui:title in anyOf option field errors with external validation
1 participant