added team view to season_leagues

This commit is contained in:
2026-02-20 19:57:06 +11:00
parent 98b110ee44
commit 53102f561a
25 changed files with 1018 additions and 51 deletions

View File

@@ -0,0 +1,24 @@
package validation
import (
"fmt"
"strconv"
)
type BoolField struct {
FieldBase
Value bool
}
func newBoolField(key string, g Getter) *BoolField {
raw := g.Get(key)
val, err := strconv.ParseBool(raw)
if err != nil {
g.AddCheck(newFailedCheck("Invalid boolean value",
fmt.Sprintf("Field %s requires a boolean value, %s given", key, raw)))
}
return &BoolField{
newField(key, g),
val,
}
}