Skip to content

Commit e650e31

Browse files
authored
1 parent d6c5ed9 commit e650e31

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

packages/vee-validate/src/Field.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { h, defineComponent, toRef, SetupContext, resolveDynamicComponent, computed, PropType, VNode } from 'vue';
1+
import {
2+
h,
3+
defineComponent,
4+
toRef,
5+
SetupContext,
6+
resolveDynamicComponent,
7+
computed,
8+
PropType,
9+
VNode,
10+
UnwrapRef,
11+
} from 'vue';
212
import { getConfig } from './config';
313
import { RuleExpression, useField } from './useField';
414
import { normalizeChildren, hasCheckedAttr, shouldHaveValueBinding, isPropPresent } from './utils';
@@ -236,6 +246,10 @@ const FieldImpl = /** #__PURE__ */ defineComponent({
236246
}
237247

238248
ctx.expose({
249+
value,
250+
meta,
251+
errors,
252+
errorMessage,
239253
setErrors,
240254
setTouched,
241255
reset: resetField,
@@ -296,6 +310,10 @@ function resolveInitialValue(props: Record<string, unknown>, ctx: SetupContext<a
296310

297311
export const Field = FieldImpl as typeof FieldImpl & {
298312
new (): {
313+
value: UnwrapRef<FieldContext['value']>;
314+
meta: UnwrapRef<FieldContext['meta']>;
315+
errors: UnwrapRef<FieldContext['errors']>;
316+
errorMessage: UnwrapRef<FieldContext['errorMessage']>;
299317
setErrors: FieldContext['setErrors'];
300318
setTouched: FieldContext['setTouched'];
301319
reset: FieldContext['resetField'];

0 commit comments

Comments
 (0)