added required validator for the TextField.Pattern option in case it is a primary key
This commit is contained in:
@@ -902,6 +902,9 @@ func (c *Collection) initIdField() {
|
||||
field.Required = true
|
||||
field.PrimaryKey = true
|
||||
field.Hidden = false
|
||||
if field.Pattern == "" {
|
||||
field.Pattern = `^[a-z0-9]+$`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user