mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-10 22:17:44 +00:00
allow more chars for ids
This commit is contained in:
parent
7714046de2
commit
cb0e05ac62
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, 7)),
|
||||
validation.Field(&acct.AccountID, validation.Required, validation.Length(5, 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, 7)),
|
||||
validation.Field(&sr.SubredditID, validation.Required, validation.Length(5, 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, 7)),
|
||||
validation.Field(&u.UserID, validation.Required, validation.Length(5, 9)),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue