guillotinaweb / ngx-schema-form

HTML form generation based on JSON Schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VisibleIf - oneOf and allOf

daniele-pecora opened this issue · comments

The processing of the visibleIf.oneOf and visibleIf.allOf fails for all fields if one field set doesn't exist at validation time.

e.G.

     "visibleIf": {
        "oneOf": [
          { 
            // the title doesn't yet exist and will be added at runtime
            // but will now make to fail all the following field checks
            "title": [
              "Dr."
            ]
          },
          {
            "forename": [
              "John"
            ]
          },
          {
            "name": [
              "Doe"
            ]
          }
        ]
      }

Considered solution would be to handle non existing fields as null or undefined values