ealush / vest

Vest ✅ Declarative validations framework

Home Page:https://vestjs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reset the errors

tig-mmp opened this issue · comments

I'm using vest with vue 3.

I want to reset a form and my problem is that the suite keep the errors.
Is there any way to remove all the errors or reset the vest?

Hey @tig-mmp 👋

Vest's cleanup function is suite.reset(), it removes all previously known validation info from the suite state so you can start fresh.

I see that the link to the article on it is missing from from the docs, so until I add it back, you can read about it in here:

https://vest.vercel.app/docs/understanding_state#solution-resetting-suite-state-with-reset

Thank you,

I was checking the documentation from vestjs.dev and didn't see any mension for the reset option. Apparently it's only in the migration guides, but I'm new to the vest so I haven't seen it