Move content encoding in the beginning of the middleware chain, update dependencies

This commit is contained in:
Ingo Oppermann
2024-10-09 14:25:42 +02:00
parent 4d6eb122b0
commit f97943b275
348 changed files with 18733 additions and 5367 deletions

View File

@@ -1,7 +1,7 @@
Package validator
=================
<img align="right" src="logo.png">[![Join the chat at https://gitter.im/go-playground/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![Project status](https://img.shields.io/badge/version-10.22.0-green.svg)
![Project status](https://img.shields.io/badge/version-10.22.1-green.svg)
[![Build Status](https://travis-ci.org/go-playground/validator.svg?branch=master)](https://travis-ci.org/go-playground/validator)
[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator)

View File

@@ -1828,7 +1828,14 @@ func requireCheckFieldValue(
return int64(field.Len()) == asInt(value)
case reflect.Bool:
return field.Bool() == asBool(value)
return field.Bool() == (value == "true")
case reflect.Ptr:
if field.IsNil() {
return value == "nil"
}
// Handle non-nil pointers
return requireCheckFieldValue(fl, param, value, defaultNotFoundValue)
}
// default reflect.String: