better validation for parent and child selection