From b0d8df8dd82b487c360c0c57093ed4302720348d Mon Sep 17 00:00:00 2001 From: Nicolas Morel Date: Thu, 2 Mar 2023 09:54:45 +0100 Subject: [PATCH] chore: fix wrong usage of Joi.expression Fixes #2922 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 3a4c641f..58fca516 100755 --- a/API.md +++ b/API.md @@ -2524,7 +2524,7 @@ Using a regular expression with template: ```js const schema = Joi.object() - .rename(/^(\d+)$/, Joi.template('x{#1}x')) + .rename(/^(\d+)$/, Joi.expression('x{#1}x')) .pattern(/^x\d+x$/, Joi.any()); const input = {