From 1a8a045ec5132e87574c2dc1b0a3d652880dac45 Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Sun, 19 Nov 2023 18:12:27 +0200 Subject: [PATCH] chore: remove log --- docs/src/pages/guide/composition-api/getting-started.mdx | 6 +++--- packages/vee-validate/src/useForm.ts | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/src/pages/guide/composition-api/getting-started.mdx b/docs/src/pages/guide/composition-api/getting-started.mdx index 883aa0c15..15dc3c822 100644 --- a/docs/src/pages/guide/composition-api/getting-started.mdx +++ b/docs/src/pages/guide/composition-api/getting-started.mdx @@ -80,9 +80,11 @@ For example, if you have a field called `email` in the form context, the field p ```ts const { defineField } = useForm(); -const email = defineField('email'); +const [email, emailAttrs] = defineField('email'); ``` +Note that `defineField` generates a pair of values, the first one is the value model and the second one is the attributes/props object. The props object contain attributes or event listeners that are useful to have on the input control or component which enables custom validation triggers and more. + Here is a basic example of how to use `defineField` with a simple input element: @@ -139,8 +141,6 @@ Notice that for components, validations are executed immediately. This is intend ### Mapping attributes and props -You have noticed in the previous examples that `defineField` generates a pair of values, the first one is the value model and the second one is the bindings object. The bindings object contain attributes or event listeners that are useful to have on the input control or component. - But aside from the attributes and listeners that vee-validate adds to those binding objects, you can also map the attributes and props of the in. This is useful when you want to: - When you want to map the attributes/props to a different name. diff --git a/packages/vee-validate/src/useForm.ts b/packages/vee-validate/src/useForm.ts index 267b1e253..b41c616b8 100644 --- a/packages/vee-validate/src/useForm.ts +++ b/packages/vee-validate/src/useForm.ts @@ -946,7 +946,6 @@ export function useForm< config?: Partial> | LazyInputBindsConfig, ) { const label = isCallable(config) ? undefined : config?.label; - console.log(label); const pathState = (findPathState(toValue(path)) || createPathState(path, { label })) as PathState; const evalConfig = () => (isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {});