From 502817b3516cd50630f6fd4777e68c3fd9636ba3 Mon Sep 17 00:00:00 2001 From: Victor Garcia Date: Wed, 11 Dec 2024 01:18:12 +0100 Subject: [PATCH] chore: fix docs --- docs/src/core-concepts/global-config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/core-concepts/global-config.md b/docs/src/core-concepts/global-config.md index db61f32..4b2b6a5 100644 --- a/docs/src/core-concepts/global-config.md +++ b/docs/src/core-concepts/global-config.md @@ -26,8 +26,8 @@ import { withMessage, minLength, required } from '@regle/rules'; const {useRegle: useCustomRegle} = defineRegleConfig({ rules: () => ({ required: withMessage(required, 'You need to provide a value'), - minLength: withMessage(minLength, ({ $params: [count] }) => { - return `Minimum length is ${count}. Current length: ${value?.length}`; + minLength: withMessage(minLength, ({ $value, $params: [count] }) => { + return `Minimum length is ${count}. Current length: ${$value?.length}`; }) }) })