Skip to content

Commit b4666fd

Browse files
chore: add float64 to valid types for RegisterFieldValidator
1 parent d62b246 commit b4666fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/apijson/enum.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type validatorFunc func(reflect.Value) exactness
2929
var validators sync.Map
3030
var validationRegistry = map[reflect.Type][]validationEntry{}
3131

32-
func RegisterFieldValidator[T any, V string | bool | int](fieldName string, values ...V) {
32+
func RegisterFieldValidator[T any, V string | bool | int | float64](fieldName string, values ...V) {
3333
var t T
3434
parentType := reflect.TypeOf(t)
3535

0 commit comments

Comments
 (0)