Sanitize on get Route


#1

Hello guys,
I was trying to use a sanitize on a get request but looking on MiddlewareValidator I saw this:

    const data = request.post()
    const sanitizedData = this.Validator.sanitize(data, validatorInstance.sanitizationRules)

And making more more research I get this issue on git.

So my question is, how can make a Validator with sanitize data on a get request route.

Thanks


#2

I do see query string getting sanitized too https://github.com/adonisjs/adonis-validation-provider/blob/develop/src/Middleware/Validator.js#L55


#3

Yep, you are right. I had seen the wrong version. Sorry about that, and Thanks!