Skip to content

When in a customValidate function, how do I get the expanded form schema? #4410

@gnalvesteffer

Description

@gnalvesteffer

Prerequisites

What theme are you using?

fluent-ui

What is your question?

Hi, I'm trying to implement a custom validation function and need to access the expanded form schema. The retrieveSchema function sounds like what I want, but I haven't had any luck getting it to return anything but the exact same form schema I passed into it: https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/utility-functions#retrieveschemat--any-s-extends-strictrjsfschema--rjsfschema-f-extends-formcontexttype--any

I need the expanded version of the schema that has the dependencies, conditions, etc already resolved so I can do something in my validation like checking a conditional set of properties that are only presented when another boolean field is true, but without this, it looks like I would have to try to resolve this myself by somehow evaluating the conditions in oneOfs and such, which seems very error-prone if I were to do it myself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions