diff --git a/docs/core/api/bind.md b/docs/core/api/bind.md index 2ad0854ca98..a1cbedd18db 100644 --- a/docs/core/api/bind.md +++ b/docs/core/api/bind.md @@ -458,22 +458,23 @@ The `MIMETypes` method is used to check if the custom binder should be used for For more control over error handling, you can use the following methods. -### Must +### WithAutoHandling -If you want to handle binder errors automatically, you can use `Must`. +If you want to handle binder errors automatically, you can use `WithAutoHandling`. If there's an error, it will return the error and set HTTP status to `400 Bad Request`. +This function does NOT panic therefor you must still return on error explicitly ```go title="Signature" -func (b *Bind) Must() *Bind +func (b *Bind) WithAutoHandling() *Bind ``` -### Should +### WithoutAutoHandling -To handle binder errors manually, you can use the `Should` method. +To handle binder errors manually, you can use the `WithoutAutoHandling` method. It's the default behavior of the binder. ```go title="Signature" -func (b *Bind) Should() *Bind +func (b *Bind) WithoutAutoHandling() *Bind ``` ## SetParserDecoder