hapijs / hapijs/joi

Bug when use ref in extensions

Open
#3,072 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
21.2k
Forks
1.5k
Avg merge
4h 57m
Merged PRs (30d)
14

Description

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.