Skip to content
Discussion options

You must be logged in to vote

never mind, found this feature is working as advertised

this what makes it works, i can get the hashed content is available in the rule definition now

validator.rule(
    'oldPasswordMatch',
    async (value, [hashed], options) => {
        console.log('hashed', hashed)    // this did shows the hashed password

        if (!false) {
            options.errorReporter.report(
                options.pointer,
                'oldPasswordMatch',
                'oldPasswordMatch does not match',
                options.arrayExpressionPointer
            )
        }
    },
    () => {
        return {
            async: true,
        }
    }
)

compare that with my question above, it contains …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nautonk
Comment options

Answer selected by wakjoko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants