Created method to validate listbox selections.