mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Move comments regex in helper file
This commit is contained in:
parent
58020420c3
commit
783e2c044d
3 changed files with 11 additions and 13 deletions
|
@ -31,3 +31,10 @@ func MatchUsernameOrBadRequest(username string, w http.ResponseWriter, l logrus.
|
|||
w,
|
||||
l)
|
||||
}
|
||||
|
||||
func MatchCommentOrBadRequest(comment string, w http.ResponseWriter, l logrus.FieldLogger) bool {
|
||||
return MatchRegexOrBadRequest(comment,
|
||||
`^(.){1,255}$`, "Comment must be between 1 and 255 characters long",
|
||||
w,
|
||||
l)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue