Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make docs for required more explicit regarding boolean values (#1261)
`required` validates that the value is not the data types default zero value. For `boolean` the default zero value is `false`. Therefore, a `false` boolean value would be interpreted as not matching the `required` validation and fail. This, in my opinion, is a little unexpected. Judging from the name `required` only, I expected that a `false` boolean value would be ok, since a value was provided. Nevertheless, in my opinion, this behavior should be documented a little more explicitly. Which is why I propose this change to the docs. - [x] Tests exist or have been written that cover this particular change. (this is only a docs change) @go-playground/validator-maintainers
- Loading branch information