I need to remove all body attributes that is not on the rules of my Validator, Adonis uses the Indicative lib to validate the data and on its configuration I can use the removeAdditional
to remove the attributes. The problem is how do I configure the Indicative through the Adonis Validator ? I have tried something similar to the way we configure a new custom rules but I had no success
const Validator = use('Validator');
Validator.configure({ removeAdditional: true });
I saw that here the validator.configure
is set by getting the validator config from the app.js
file, but even adding validator: { removeAdditional: true }
I had no success