Skip to content

Optional arrays that have required elements are showing up as empty thus breaking validation #15

Open
@ramesees

Description

@ramesees

I have a JSON schema in which one of the top level properties is of type array, but this property is not a required property.

However the array definition is specified such that it must have at least one item inside (if it is specified on the top level property).

When rendering the form with the startEmpty property set to true, I get a property added into my produced JSON document. However my server side validation routine then rejects the document saying I need to provide at least one child item.

Is it possible to have a setting which doesnt create the array property on the resultant JSON document and upon clicking Add creates the property and initialises it to empty until I populate it ?

Thanks

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