How to make a field Mandatory based on a field in Item?

Hello,

I have added a field names is_wire to Item DocType by Customize Form (Ctrl+J).

In Purchase Receipt Items I want to make quality_inspection field Mandatory if the field is_wire of Item added to Purchase Receipt is checked.

For this I have set Mandatory Depends On as follows

eval:doc.item_code.is_wire

But this is not working and I am able to submit Purchase Receipt even if quality_inspection field is empty.

How to solve this?

TIA

Yogi Yang

Hello,

I found this issue on Git.

https://github.com/frappe/frappe/issues/10259

How to set a few fields to be Mandatory if is_wire = 1?

TIA

Yogi Yang