ealush / vest

Vest ✅ Declarative validations framework

Home Page:https://vestjs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: Detect if property is in test suite

MentalGear opened this issue · comments

Is there a way to detect if a property is in the suite?
I'd like to let only properties with validation rules pass, and delete all the rest from form data.
For example: is there a returned object that has properties which were not validated against ?

Hey, sorry for replying late. I was sick and then traveling.

Not sure what it is exactly that you want to achieve, can you provide an example?
In the general sense, the suite doesn't care much about the data that goes in but rather the result of the tests, so this is not strictly something that Vest supports. But we can probably pretty easily cook some helper function around Vest's result object to achieve that.