mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-10 22:17:44 +00:00
avoid double escaping
This commit is contained in:
parent
8a8431fc0f
commit
8cdb8bb621
1 changed files with 1 additions and 1 deletions
|
@ -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.Match(regexp.MustCompile("^(?!u_)[a-zA-Z0-9]\\w{1,19}$"))),
|
||||
validation.Field(&sr.Name, validation.Required, validation.Length(3, 32), validation.Match(regexp.MustCompile(`^(?!u_)[a-zA-Z0-9]\w{1,19}$`))),
|
||||
validation.Field(&sr.SubredditID, validation.Required, validation.Length(4, 9)),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue