mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
remove the ability to start an Index, Frame, ColumnLabel, or RowLabel with a number
This commit is contained in:
parent
692d997cab
commit
b0fa067ffc
2 changed files with 4 additions and 2 deletions
|
|
@ -91,6 +91,7 @@ func TestFrame_NameValidation(t *testing.T) {
|
|||
}
|
||||
invalidFrameNames := []string{
|
||||
"",
|
||||
"123abc",
|
||||
"x.y",
|
||||
"_foo",
|
||||
"-bar",
|
||||
|
|
@ -131,6 +132,7 @@ func TestFrame_RowLabelValidation(t *testing.T) {
|
|||
"UPPERCASE",
|
||||
}
|
||||
invalidRowLabels := []string{
|
||||
"123abc",
|
||||
"x.y",
|
||||
"_foo",
|
||||
"-bar",
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ var (
|
|||
)
|
||||
|
||||
// Regular expression to validate index and frame names.
|
||||
var nameRegexp = regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,64}$`)
|
||||
var nameRegexp = regexp.MustCompile(`^[a-z][a-z0-9_-]{0,64}$`)
|
||||
|
||||
// Regular expression to validate row and column labels.
|
||||
var labelRegexp = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]{0,64}$`)
|
||||
var labelRegexp = regexp.MustCompile(`^[A-Za-z][A-Za-z0-9_-]{0,64}$`)
|
||||
|
||||
// ColumnAttrSet represents a set of attributes for a vertical column in an index.
|
||||
// Can have a set of attributes attached to it.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue