-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Create constructor funcs for untyped values, e.g. for ft.Bool
func BoolFromAny(val any) Bool {
// Use type switch with logic similar to Bool.UnmarshalJSON
// https://go.dev/tour/methods/16
}Consider the logic for strings in Bool.UnmarshalJSON, it follows the definition for truthy described here, that is: "all values are truthy unless they are defined as falsy". The values for falsy in this packge do not correspond to JavaScript. Add "no", "disabled", and "off" as additional falsy values?
Also consider checkbox inputs: "a checkbox's value is only included in the submitted data if the checkbox is currently checked. If it is, then the value of the checkbox's value attribute is reported as the input's value, or on if no value is set"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels