Right now there is no convenient way to pass global options to the validate function from validatejs. Example: I want to set the fullMessages option to false so I can use i18n on the error messages.
I think a good way to implement it would be to add an optional options argument to the Validator class constructor (also maybe as an argument to the exported configure function so we can pass it to the Validator instantiation).
Ex:
export function configure(config, options) {
config.container.registerInstance(ValidatorInterface, new Validator(options));
}
Right now there is no convenient way to pass global options to the validate function from validatejs. Example: I want to set the fullMessages option to false so I can use i18n on the error messages.
I think a good way to implement it would be to add an optional options argument to the Validator class constructor (also maybe as an argument to the exported configure function so we can pass it to the Validator instantiation).
Ex: