Test search key validation.