errors and searchtype validation