Skip to content

Magento 2 add custom validation rule for two dynamic fields

In admin product edit page I added dynamic fields. Now I want to validate the filed based on the value of another field.

For example, I want to make Value Required/Optional based on the value of Unit

enter image description here