completed validate search input