Skip to content

Conversation

@umerbilal-tech
Copy link

this function will help you to convert fasthttp and gofiber context to a http/net request
so that fasthttp and gofiber users can also utilize this package

@umerbilal-tech
Copy link
Author

i was using gofiber and i found your validator interesting because I am Laravel developer as well. but problem I found in your validator is that it only supports net/http request for validations. so to resolve that issue I added a new function through which user can convert there fasthttp request to net/http and continue to use your validator in gofiber and fasthttp.
Example of using will be like
opts := govalidator.Options{ Request: govalidator.ConvertFastHttpRequest(c.Context()), //c is gofiber context Rules: rules, // rules map Messages: messages, // custom message map (Optional) RequiredDefault: true, // all the field to be pass the rules }

@umerbilal-tech
Copy link
Author

@thedevsaddam

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

Successfully merging this pull request may close these issues.

2 participants