admin page updates

This commit is contained in:
2026-02-13 20:51:39 +11:00
parent 01c6b5250f
commit 55f79176cc
34 changed files with 1737 additions and 164 deletions

View File

@@ -2,6 +2,7 @@ package validation
import (
"net/http"
"strings"
"git.haelnorr.com/h/golib/hws"
"git.haelnorr.com/h/timefmt"
@@ -21,6 +22,10 @@ func (q *QueryGetter) Get(key string) string {
return q.r.URL.Query().Get(key)
}
func (q *QueryGetter) GetList(key string) []string {
return strings.Split(q.Get(key), ",")
}
func (q *QueryGetter) getChecks() []*ValidationRule {
return q.checks
}
@@ -45,6 +50,14 @@ func (q *QueryGetter) Time(key string, format *timefmt.Format) *TimeField {
return newTimeField(key, format, q)
}
func (q *QueryGetter) StringList(key string) *StringList {
return newStringList(key, q)
}
func (q *QueryGetter) IntList(key string) *IntList {
return newIntList(key, q)
}
func (q *QueryGetter) Validate() bool {
return len(validate(q)) == 0
}