return correct json response when search_form is invalid