added form validation for search page