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

added ConvertFastHttpRequest function that will help to convert fasthttp and gofiber context to net/http request #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

2 participants