Rule on hiding other fields when one is empty

I would like to add a rule that hides other fields, when one (number) field is empty. I do not know how to do this, as I believe that the schema does not exist before I type something in to that field. How can I add a rule that until I add some information to that number field, few others are hidden?

Does this Stackoverflow maybe have something to do with this issue jsonschema - enforce empty JSON schema - Stack Overflow ?

[original thread by Henri Tunkkari]

Hi! On each control you want to hide you add a rule that only when a valid number property exists, the control will be shown:

type: Control
scope: '<path-to-foo-property'
rule: {
  effect: SHOW
  condition: {
    scope: '#',
    schema: {
      properties: {
        numberProperty: { type: 'number' }
      required: ['numberPropery']

[Henri Tunkkari]

Hi, I resolved the issue using the following schema:

"rule": {
    "effect": "HIDE",
    "condition": {
        "scope": "#/properties/***/***/...",
        "schema": { 
            "not": {
                "type": "number"


It there any possible to test with other condition other then type? i am asking testing custom field?

Hi @fioyesuraj(fioyesuraj), you have the full expressibility of JSON Schema at hand. Whenever your provided JSON Schema in schema successfully validates (i.e. no errors) against the scope, the effect will take place.