diff --git a/validator.go b/validator.go index 27e88ca..9960189 100644 --- a/validator.go +++ b/validator.go @@ -81,4 +81,4 @@ func validateIdent(s string) error { return nil } -var identRegexp = regexp.MustCompile("^[a-zA-Z_:][a-zA-Z0-9_:]*$") +var identRegexp = regexp.MustCompile("^[a-zA-Z_:.][a-zA-Z0-9_:.]*$") diff --git a/validator_test.go b/validator_test.go index d90b62d..8a5d734 100644 --- a/validator_test.go +++ b/validator_test.go @@ -18,6 +18,7 @@ func TestValidateMetricSuccess(t *testing.T) { f(`foo{bar="baz", x="y\"z"}`) f(`foo{bar="b}az"}`) f(`:foo:bar{bar="a",baz="b"}`) + f(`some.foo{bar="baz"}`) } func TestValidateMetricError(t *testing.T) {