How to give multiple rule effects on the element?

I want to give 2 different rule effects on the element. Let’s say in the following UI schema subCategory will be visible when the category length is more than 3 letters, once this condition is satisfied and subCategory is visible than I want to apply DISABLE effect on subCategory.

{
“type”: “Control”,
“scope”: “#/properties/subCategory”,
“rule”: {
“effect”: “SHOW”,
“condition”: {
“scope”: “#/properties/category”,
“schema”: {
“type”: “string”,
“minLength”: 3
}
}
}
}

[original thread by Harshita Jaiswal]

Hi @jharshita, thanks for your question! Currently you can only apply a single rule to each element. As a workaround you could wrap the control into VerticalLayout and apply the second rule to this element. Visually this should look the same.

[shivgarg5676]

e.g.

{
    "type": "Group",
    elements: [{
        type: "Control",
        scope: "#/properties/a",
        rule: {
        }
    }],
    rule:{
    }
}