mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 22:35:27 +00:00
allow 4 chars too
This commit is contained in:
parent
cb0e05ac62
commit
95b58b2c01
3 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ func (acct *Account) NormalizedUsername() string {
|
|||
func (acct *Account) Validate() error {
|
||||
return validation.ValidateStruct(acct,
|
||||
validation.Field(&acct.Username, validation.Required, validation.Length(3, 32)),
|
||||
validation.Field(&acct.AccountID, validation.Required, validation.Length(5, 9)),
|
||||
validation.Field(&acct.AccountID, validation.Required, validation.Length(4, 9)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ func (sr *Subreddit) NormalizedName() string {
|
|||
func (sr *Subreddit) Validate() error {
|
||||
return validation.ValidateStruct(sr,
|
||||
validation.Field(&sr.Name, validation.Required, validation.Length(3, 32)),
|
||||
validation.Field(&sr.SubredditID, validation.Required, validation.Length(5, 9)),
|
||||
validation.Field(&sr.SubredditID, validation.Required, validation.Length(4, 9)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ func (u *User) NormalizedName() string {
|
|||
func (u *User) Validate() error {
|
||||
return validation.ValidateStruct(u,
|
||||
validation.Field(&u.Name, validation.Required, validation.Length(3, 32)),
|
||||
validation.Field(&u.UserID, validation.Required, validation.Length(5, 9)),
|
||||
validation.Field(&u.UserID, validation.Required, validation.Length(4, 9)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue