I'm facing issues in New UX Action button .

NOTE: Code AND Parent(Drop down selector) is a parent child relationship.
When I enter a code in the pop-up of action button and if I click on Submit without even selecting the parent from the below drop down. The process gets submitted and that code gets added . Code becomes an orphan as I didn't select any parent value for it .
Is there any solution that process will not be able to submit without selecting parent for the code?? So, Code doesn't become an orphan.