adding validation for search page