In the UI schema, i plan to use “ListWithDetail”, i have requirement, where i had
enable “value” and “subvalue” fields when “payment” is “mastercard” and “country” is “US”
and
disable “value” and “subvalue” fields when “payment” is “mastercard” and “country” is “none”
How do i go on implementing rules in UI Schema for this, Thanks
Thanks for the reply, in your reply the enable rule effect is applied for “value” scope, based on the scope of “payment” element. It is a simple case enabling or disabling one control or element
The question i originally asked is enabling “value” control based on “payment” and “country” control.
If payment is 'mastercard ’ and country is ‘US’ enable value field
If payment is 'mastercard ’ and country is ‘None’ disable value field
I don’t know how to apply multiple rules to single element
You can check multiple properties by referring to their parent scope, in this case it’s just #. You don’t need multiple rules for a single element as the provided schema can be arbitrarily complex and therefore cover all use cases.
It would help if you could specify your complete set of requirements, i.e. what shall happen in all the other cases?
What shall happen if payment is not mastercard?
What shall happen if payment is mastercard and the country is not US or None?