+
Skip to content

❓ Question: Required field in array #70

@justjam2013

Description

@justjam2013

Describe the question

If I have a schema with a property that is an array of objects, how do I specify that a field in the array-object is readonly, based on a separate boolean field?

To Reproduce

In this playground example, if isFoo then the first if/else condition specifies that fooContents are required and name must be "Bar". This condition is to prove that the syntax is correct,
The second if/else condition fails to specify that the name property is disabled if isFoo is false.

What is the correct syntax to use here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载