added client-side validation to re-search