Skip to content

Commit

Permalink
feat: expose values, errors and meta on form instance #4589
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Dec 14, 2023
1 parent a07ba1d commit e2171f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-rivers-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vee-validate": patch
---

feat: expose some state on form instance
6 changes: 6 additions & 0 deletions packages/vee-validate/src/Form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ const FormImpl = /** #__PURE__ */ defineComponent({
getValues,
getMeta,
getErrors,
values,
meta,
errors,
});

return function renderForm() {
Expand Down Expand Up @@ -240,6 +243,9 @@ export const Form = FormImpl as typeof FormImpl & {
getValues: FormSlotProps['getValues'];
getMeta: FormSlotProps['getMeta'];
getErrors: FormSlotProps['getErrors'];
meta: FormSlotProps['meta'];
values: FormSlotProps['values'];
errors: FormSlotProps['errors'];
$slots: {
default: (arg: FormSlotProps) => VNode[];
};
Expand Down

0 comments on commit e2171f8

Please sign in to comment.