Fabian Hiller
Fabian Hiller
Does `required('Please enter your name.')` fix it?
I need more of your code or a reproduction on Stackblitz. What framework are you using?
Feel free to create a reproduction using this template: https://stackblitz.com/edit/modular-forms-solid?file=src%2Froutes%2Flogin.tsx
From my point of view, this is the intended behavior. Valibot tries to behave similar to TypeScript and `Omit` only omits known properties. We can leave this issue open for...
`omit` "deletes" the selected entries when initializing the schema. This results in a smaller bundle size and better performance. `except` could work differently and check during parsing if any of...
Here is another workaround that can be used in the meantime: ```ts const Schema = v.objectWithRest( { key1: v.never(), key2: v.string() }, v.unknown() ); ``` > In my example, `key1`...
> can you please provide a quick example? Currently, you get a TS error if you specify an invalid key: `v.omit(v.object({ key1: v.string() }), ['keyX'])`
Yes, that could be possible.
Hey, sorry for not adding a comment. I closed it because I will be releasing v1 in the next few hours and don't plan to change the implementation of `omit`...
Unfortunately, the TypeScript type `NewableFunction` is not compatible with `InstanceType`. The only thing we could consider is adding `// @ts-expect-error` if there is no downside. I also recommend using `custom`...