I want to set anyone field is required from two fields [UiComponent]

enter image description here

for example, either text field or Image anyone needs to a required field otherwise can not save.

1 Answer 1


I manage this validation by trick while saving data

In save controller you should check condition for blank data

if(!$Data['textfield'] && !isset($Data['image'])){
                        'please add image or text.'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.