add valdator for search controller, and improve search controller