chore: add float64 to valid types for RegisterFieldValidator

This commit is contained in:
stainless-app[bot]
2025-12-18 10:53:06 +00:00
parent da41d92446
commit 45952afd58

View File

@@ -29,7 +29,7 @@ type validatorFunc func(reflect.Value) exactness
var validators sync.Map
var validationRegistry = map[reflect.Type][]validationEntry{}
func RegisterFieldValidator[T any, V string | bool | int](fieldName string, values ...V) {
func RegisterFieldValidator[T any, V string | bool | int | float64](fieldName string, values ...V) {
var t T
parentType := reflect.TypeOf(t)