You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea-fork-majority-judgment/modules/auth/poll_form.go

18 lines
478 B

package auth // not sure why this is in package auth?
import (
"gitea.com/macaron/binding"
"gitea.com/macaron/macaron"
)
// Form for creating a poll
type CreatePollForm struct {
Subject string `binding:"Required;MaxSize(128)"` // 128 is duplicated in the template
Description string
}
// Validate validates the form fields
func (f *CreatePollForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}