Added validation function for the filtering dropdowns