Validate the injected package path and name.