I think that you should look class Magento\Backend\Block\Widget\Form\Element\DependenceMagento\Backend\Block\Widget\Form\Element\Dependence
. You can create your own block inherited from this class and rewrite it how you want. In your code replaces block call:
$this->getLayout()->createBlock(
'Magento\Backend\Block\Widget\Form\Element\Dependence'
)
Toto:
this->getLayout()->createBlock(
’Siarhey\Test\Block\Widget\Form\Element\Dependence''Siarhey\Test\Block\Widget\Form\Element\Dependence'
)
Create block
Siarhey\Test\Block\Widget\Form\Element\Dependence
And and you can implement in it your logic of verification.
It is only advice. I hope that it helps you.