Skip to content

version(0.8.14) regression in conditional array validation #986

Open
@rthaut

Description

@rthaut

This appears to be a new bug introduced in version 0.8.14.

Basically, if you have an array property in your schema, and that property is conditional, the form is not being validated correctly.

Here is a reduced example showing it working with version 0.8.13.

Here is the exact same example NOT working with version 0.8.14.

In both examples, if you check the "Show Array Elements" checkbox, the array section appears. If you provide at least a value for Field 1 and submit, the form validates for 0.8.13, but not for 0.8.14.

In 0.8.14, the form has the following $error:

"$error": {
  "schemaForm": [
    {
      "$viewValue": [
        {
          "Field1": "My Test Value for Field1"
        }
      ],
      "$modelValue": [
        {
          "Field1": "My Test Value for Field1"
        }
      ],
      "$validators": {},
      "$asyncValidators": {},
      "$parsers": [
        null
      ],
      "$formatters": [
        null
      ],
      "$viewChangeListeners": [],
      "$untouched": true,
      "$touched": false,
      "$pristine": false,
      "$dirty": true,
      "$valid": false,
      "$invalid": true,
      "$error": {
        "schemaForm": true
      },
      "$name": "",
      "$options": {}
    }
  ]
}

@json-schema-form/angular-schema-form-lead

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions