go-playground / validator

:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
MIT License
16.14k stars 1.29k forks source link

Fix Type called on zero reflect.Value #1156

Closed MysteriousPotato closed 10 months ago

MysteriousPotato commented 10 months ago

Fixes Or Enhances

1155

Simply added back the check for invalid reflect types before calling Type on reflect.Value.

Make sure that you've checked the boxes below before you submit PR:

@go-playground/validator-maintainers

coveralls commented 10 months ago

Coverage Status

coverage: 73.849% (+0.006%) from 73.843% when pulling 82faf7721d819bae6e9a71e848160f1d40670442 on MysteriousPotato:main into 1b40ba0cb450466ab9571f5adff040b141202daa on go-playground:master.