allow more chars for ids

This commit is contained in:
Andre Medeiros 2021-10-13 23:47:50 -04:00
parent 7714046de2
commit cb0e05ac62
3 changed files with 3 additions and 3 deletions

View file

@ -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, 7)),
validation.Field(&acct.AccountID, validation.Required, validation.Length(5, 9)),
)
}

View file

@ -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, 7)),
validation.Field(&sr.SubredditID, validation.Required, validation.Length(5, 9)),
)
}

View file

@ -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, 7)),
validation.Field(&u.UserID, validation.Required, validation.Length(5, 9)),
)
}