2016-12-21 21:42:47 +00:00
|
|
|
package api
|
2015-10-20 17:09:48 +00:00
|
|
|
|
|
|
|
import "regexp"
|
|
|
|
|
|
|
|
// RestrictedNameChars collects the characters allowed to represent a name, normally used to validate container and volume names.
|
|
|
|
const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`
|
|
|
|
|
|
|
|
// RestrictedNamePattern is a regular expression to validate names against the collection of restricted characters.
|
2016-11-23 19:45:35 +00:00
|
|
|
var RestrictedNamePattern = regexp.MustCompile(`^` + RestrictedNameChars + `+$`)
|