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}`; }) }) })