Using older version of Indicative or @adonisjs/validator?. Click here to access the old version documentation.

guides

configure

The configure method exposes the API to define global settings applicable to all validator methods.

You can define all these values inline with validate and validateAll methods as well.

existyStrict (false)

The existyStrict property tells validator, which properties must be considered non-existing. When it's set to true, then only undefined values are considered non-existing, otherwise null, empty string, undefined all are considered non-existing.

removeAdditional (false)

Setting it true will make validator remove all non validated key/value pairs from the main data object.

formatter (JsonApiFormatter)

The formatter to be used for all validations.