Skip to content

Failure message override error #23

@jack828

Description

@jack828

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions