Skip to content

Bug when use ref in extensions #3072

Open
@joaopalopes24

Description

@joaopalopes24

Runtime

Node.js

Runtime version

v22.14.0

Module version

v17.13.3

Last module version without issue

No response

Used with

No response

Any other relevant information

Documentation: https://joi.dev/api/?v=17.13.3#extensions

This part in documentation don't work correctly.

a: custom.million().round().dividable(Joi.ref('b')),

What are you trying to achieve or the steps to reproduce?

Create an schema using the example of the documentation.

What was the result you got?

Error: args.q is undefined

What result did you expect?

The argument must come with the correct value of the reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug or defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions