1
0

make validation less verbose (#23)

This commit is contained in:
konrad
2018-11-24 12:44:40 +00:00
committed by Gitea
parent fded3c23d0
commit d51ed8defd
9 changed files with 22 additions and 22 deletions

View File

@ -3,7 +3,7 @@ package models
// ListTask represents an task in a todolist
type ListTask struct {
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"listtask"`
Text string `xorm:"varchar(250)" json:"text" valid:"runelength(5|250)"`
Text string `xorm:"varchar(250)" json:"text" valid:"runelength(3|250)"`
Description string `xorm:"varchar(250)" json:"description" valid:"runelength(0|250)"`
Done bool `xorm:"INDEX" json:"done"`
DueDateUnix int64 `xorm:"int(11) INDEX" json:"dueDate"`
@ -11,8 +11,8 @@ type ListTask struct {
CreatedByID int64 `xorm:"int(11)" json:"-"` // ID of the user who put that task on the list
ListID int64 `xorm:"int(11) INDEX" json:"listID" param:"list"`
Created int64 `xorm:"created" json:"created" valid:"range(0|0)"`
Updated int64 `xorm:"updated" json:"updated" valid:"range(0|0)"`
Created int64 `xorm:"created" json:"created"`
Updated int64 `xorm:"updated" json:"updated"`
CreatedBy User `xorm:"-" json:"createdBy"`