Skip to content

validation of conditionally showed input #424

@haluz

Description

@haluz

Hi, this is my form:

[
    {
      "key": "showinput",
      "type": "checkbox"
    },
    {
      "key": "seconds",
      "type": "number",
      "condition": "model.showinput"
    }
]

and this is my schema:

{
    "type": "object",
    "properties": {
      "showinput": {
        "type": "boolean",
        "title": "Show integer input",
        "default": true
      },
      "seconds": {
        "type": "integer",
        "title": "Seconds",
        "default": 60,
        "minimum": 1
      }
    },
    "required": [
      "seconds"
    ]
}

What I do:

  1. Remove any data from "Seconds" input (the form becomes invalid).
  2. Uncheck the "Show Integer Input" checkbox (the form is valid again).
  3. Check the "Show Integer Input" checkbox back.

And now the form is still valid! I need it invalid obviously, how can I fix that?

Thanks)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions