added validation to the search box.