Corrected search box validation