Open umerbilal-tech opened 2 years ago
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 }
@thedevsaddam
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