i am trying to use rules but i am not able to figure out what schema in rules is used for ?
i have control named animalName and another control typeOfAnimal based on animalName
“rule”: {
“effect”: “DISABLE”,
“condition”: {
“scope”: “#/properties/animalName”,
“schema”: {
///////////// use of this schema ?
}
}
}
In schema any JSON schema can be placed. We use it to validate against the data found at the scope path. Either the data matches the schema, then the rule takes effect, or the data doesn’t match the schema, then the opposite effect is applied.
Now let’s say you want to disable the vegetarian option until the name is at least 3 characters long, for this you could use the following rule on the vegetarian control: