code: func NewValidatorImpl(channelID string, config *cb.Config, namespace string, pm policies.Manager) (*ValidatorImpl, error) {
  	if config == nil {
  		return nil, errors.Errorf("nil config parameter")
  	}
  
  	if config.ChannelGroup == nil {
  		return nil, errors.Errorf("nil channel group")
  	}
  
  	if err := validateChannelID(channelID); err != nil {
  		return nil, errors.Errorf("bad channel ID: %s", err)
  	}
  
  	configMap, err := mapConfig(config.ChannelGroup, namespace)
  	if err != nil {
  		return nil, errors.Errorf("error converting config to map: %s", err)
  	}
  
  	return &ValidatorImpl{
  		namespace:   namespace,
  		pm:          pm,
  		sequence:    config.Sequence,
  		configMap:   configMap,
  		channelID:   channelID,
  		configProto: config,
  	}, nil
  }
docs: // NewValidatorImpl constructs a new implementation of the Validator interface.