From 42e60141ce74370e2e3792ef1eca3fce3379b4f2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 6 Sep 2020 18:51:03 +0200 Subject: [PATCH] Fix docs minLength --- pkg/models/label.go | 2 +- pkg/models/list.go | 2 +- pkg/models/namespace.go | 2 +- pkg/models/tasks.go | 2 +- pkg/models/teams.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/models/label.go b/pkg/models/label.go index dc0524cdf..a9a296931 100644 --- a/pkg/models/label.go +++ b/pkg/models/label.go @@ -27,7 +27,7 @@ type Label struct { // The unique, numeric id of this label. ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"label"` // The title of the lable. You'll see this one on tasks associated with it. - Title string `xorm:"varchar(250) not null" json:"title" valid:"runelength(1|250)" minLength:"3" maxLength:"250"` + Title string `xorm:"varchar(250) not null" json:"title" valid:"runelength(1|250)" minLength:"1" maxLength:"250"` // The label description. Description string `xorm:"longtext null" json:"description"` // The color this label has diff --git a/pkg/models/list.go b/pkg/models/list.go index e18f1bc43..49ebbcb6c 100644 --- a/pkg/models/list.go +++ b/pkg/models/list.go @@ -32,7 +32,7 @@ type List struct { // The unique, numeric id of this list. ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"list"` // The title of the list. You'll see this in the namespace overview. - Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"3" maxLength:"250"` + Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The description of the list. Description string `xorm:"longtext null" json:"description"` // The unique list short identifier. Used to build task identifiers. diff --git a/pkg/models/namespace.go b/pkg/models/namespace.go index 68decb34d..95ab32185 100644 --- a/pkg/models/namespace.go +++ b/pkg/models/namespace.go @@ -30,7 +30,7 @@ type Namespace struct { // The unique, numeric id of this namespace. ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"namespace"` // The name of this namespace. - Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"5" maxLength:"250"` + Title string `xorm:"varchar(250) not null" json:"title" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The description of the namespace Description string `xorm:"longtext null" json:"description"` OwnerID int64 `xorm:"int(11) not null INDEX" json:"-"` diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index af86d83ff..2d1d4533b 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -37,7 +37,7 @@ type Task struct { // The unique, numeric id of this task. ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"listtask"` // The task text. This is what you'll see in the list. - Title string `xorm:"varchar(250) not null" json:"title" valid:"runelength(1|250)" minLength:"3" maxLength:"250"` + Title string `xorm:"varchar(250) not null" json:"title" valid:"runelength(1|250)" minLength:"1" maxLength:"250"` // The task description. Description string `xorm:"longtext null" json:"description"` // Whether a task is done or not. diff --git a/pkg/models/teams.go b/pkg/models/teams.go index 781f14ba4..36817a1fa 100644 --- a/pkg/models/teams.go +++ b/pkg/models/teams.go @@ -29,7 +29,7 @@ type Team struct { // The unique, numeric id of this team. ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"team"` // The name of this team. - Name string `xorm:"varchar(250) not null" json:"name" valid:"required,runelength(1|250)" minLength:"5" maxLength:"250"` + Name string `xorm:"varchar(250) not null" json:"name" valid:"required,runelength(1|250)" minLength:"1" maxLength:"250"` // The team's description. Description string `xorm:"longtext null" json:"description"` CreatedByID int64 `xorm:"int(11) not null INDEX" json:"-"`