Hello guys, I’m implementing a form using the library, and I’m having problems adding fields and disabling them if another field is empty. Is this functionality allowed? I have tried with the DISABLE rule and a const with null in the schema but it is not working. Is it okay to say that the initial field value is null?
By default initial field values are undefined. The issue you are likely running into is that for JSON Schema undefined has no meaning. Therefore any rule will succeed for undefined values.
If that is the issue you are running into then you have two ways of solving it:
Modify your schema in the rule to point to the parent of the value instead and then use required to let the rule fail in case the property does not exist. That’s the JSON Schema way to handle undefined values