hapijs / hapijs/joi

Incorrect documentation for additional context properties for string.pattern.* errors

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

Description

#### Context

* *node version*: 12
* *module version*: 17.4.2

The [docs](https://joi.dev/api/?v=17.4.2#stringpatternbase) for

`string.pattern.base`
`string.pattern.name`
`string.pattern.invert.base`
`string.pattern.invert.name`

states the additional context properties contain a `pattern` key. The key that is passed is actually [regex](https://github.com/sideway/joi/blob/83092836583a7f4ce16cbf116b8776737e80d16f/lib/types/string.js#L711)

I can do a PR for this

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.