Unistore: Relax resource validation regex (#111885)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
This commit is contained in:
@@ -23,9 +23,9 @@ const qualifiedNameFmt string = "^(" + qnameCharFmt + qnameExtCharFmt + "*)?" +
|
||||
const qualifiedNameErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character"
|
||||
|
||||
const alphaCharFmt string = "[A-Za-z]"
|
||||
const resourceCharFmt string = "[A-Za-z0-9]" // alpha numeric
|
||||
const resourceCharFmt string = "[A-Za-z0-9-]" // alpha numeric plus dashes
|
||||
const resourceFmt string = "^" + alphaCharFmt + resourceCharFmt + "*$"
|
||||
const resourceErrMsg string = "must consist of alphanumeric characters"
|
||||
const resourceErrMsg string = "must consist of alphanumeric characters and dashes, and must start with an alphabetic character"
|
||||
|
||||
var (
|
||||
grafanaNameRegexp = regexp.MustCompile(grafanaNameFmt).MatchString
|
||||
|
||||
Reference in New Issue
Block a user