mirror of
https://github.com/openai/openai-go.git
synced 2026-04-01 17:17:14 +09:00
chore: add float64 to valid types for RegisterFieldValidator
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user