1
0

Make validation less verbose (#24)

This commit is contained in:
konrad
2018-11-25 21:38:50 +00:00
committed by Gitea
parent e5c1588576
commit b73786f7fe
5 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ type UserLogin struct {
// User holds information about an user
type User struct {
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id"`
Username string `xorm:"varchar(250) not null unique" json:"username" valid:"length(5|250)"`
Username string `xorm:"varchar(250) not null unique" json:"username" valid:"length(3|250)"`
Password string `xorm:"varchar(250) not null" json:"-"`
Email string `xorm:"varchar(250)" json:"email" valid:"email,length(0|250)"`
IsActive bool `json:"-"`