added required validator for the TextField.Pattern option in case it is a primary key

This commit is contained in:
Gani Georgiev
2024-11-19 17:21:25 +02:00
parent 48328bf33f
commit 9fe4f87e5b
8 changed files with 31 additions and 9 deletions
+1 -1
View File
@@ -724,7 +724,7 @@ func TestCollectionCreate(t *testing.T) {
ExpectedContent: []string{
`"name":"new"`,
`"type":"view"`,
`"fields":[{"autogeneratePattern":"","hidden":false,"id":"text3208210256","max":0,"min":0,"name":"id","pattern":"","presentable":false,"primaryKey":true,"required":true,"system":true,"type":"text"}]`,
`"fields":[{"autogeneratePattern":"","hidden":false,"id":"text3208210256","max":0,"min":0,"name":"id","pattern":"^[a-z0-9]+$","presentable":false,"primaryKey":true,"required":true,"system":true,"type":"text"}]`,
},
ExpectedEvents: map[string]int{
"*": 0,