hyperledger/fabric · error
collection-name: %s not allowed. A valid collection name fol
Error message
collection-name: %s not allowed. A valid collection name follows the pattern: %s
What it means
Returned by validateCollectionName when the name partially matches validCollectionNameRegex but not fully — it contains characters outside the allowed pattern for private-data collection names. The message names both the offending name and the expected pattern.
Source
Thrown at core/handlers/validation/builtin/v12/validation_logic.go:353
if err := checkForMissingCollections(newCollectionsMap, oldCollectionConfigs); err != nil {
return err
}
if err := checkForModifiedCollectionsBTL(newCollectionsMap, oldCollectionConfigs); err != nil {
return err
}
return nil
}
func validateCollectionName(collectionName string) error {
if collectionName == "" {
return fmt.Errorf("empty collection-name is not allowed")
}
match := validCollectionNameRegex.FindString(collectionName)
if len(match) != len(collectionName) {
return fmt.Errorf("collection-name: %s not allowed. A valid collection name follows the pattern: %s",
collectionName, AllowedCharsCollectionName)
}
return nil
}
// validateRWSetAndCollection performs validation of the rwset
// of an LSCC deploy operation and then it validates any collection
// configuration.
func (vscc *Validator) validateRWSetAndCollection(
lsccrwset *kvrwset.KVRWSet,
cdRWSet *ccprovider.ChaincodeData,
lsccArgs [][]byte,
lsccFunc string,
ac vc.Capabilities,
channelName string,
) commonerrors.TxValidationError {
/********************************************/
/* security check 0.a - validation of rwset */View on GitHub (pinned to 2736b63f8f)
Solutions
- Rename the collection to match the allowed pattern (alphanumerics, underscores, dashes, and dots as defined by the regex)
- Sanitize generated collection names
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/handlers/validation/builtin/v12/validation_logic.go:353 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/0d5c916da6a91ba3.
Report an issue: GitHub.