When using createValidatorAllowingFailureMessageOverride, incorrect arguments are passed to the validateFn. A validator expects arguments like fn(key, name, object, callback), whereas createValidator provides fn(name, object, callback).
This means it is not possible to use createValidatorAllowingFailureMessageOverride with any validity modules, only with booleanToCallback.
Is there a reason for this or shall I submit a PR?
When using
createValidatorAllowingFailureMessageOverride, incorrect arguments are passed to the validateFn. A validator expects arguments likefn(key, name, object, callback), whereas createValidator providesfn(name, object, callback).This means it is not possible to use
createValidatorAllowingFailureMessageOverridewith any validity modules, only withbooleanToCallback.Is there a reason for this or shall I submit a PR?