#144 Fix plugin name and version validation

This commit is contained in:
Tomasz Sęk
2019-11-29 11:40:35 +01:00
parent f0d058fb79
commit e911468833
2 changed files with 44 additions and 2 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ func (p Plugin) String() string {
}
var (
namePattern = regexp.MustCompile(`(?i)^[0-9a-z-_]+$`)
versionPattern = regexp.MustCompile(`^[0-9\\.-]+(\..+)?$`)
namePattern = regexp.MustCompile(`^[0-9a-zA-Z-_]+$`)
versionPattern = regexp.MustCompile(`^[0-9a-zA-Z+\\.-]+$`)
)
// New creates plugin from string, for example "name-of-plugin:0.0.1"