Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: how to use github.com/go-playground/validator to validate the request #850

Open
westwin opened this issue May 2, 2024 · 1 comment

Comments

@westwin
Copy link

westwin commented May 2, 2024

I'm thinking if there's a way to write a server plugin to validate the request ?
looks like server PreCall plugin can do this.

but what if with the use of AddHandler() ?

thanks

@westwin
Copy link
Author

westwin commented May 2, 2024

and btw, in https://github.com/smallnest/rpcx/blob/master/client/xclient.go, line 889
c.Plugins.DoPreCall(ctx, c.servicePath, serviceMethod, args)

what if the DoPreCall() returns an error ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant