T
TanStack8mo ago
xenial-black

valibotValidator deprecated

'valibotValidator' is deprecated.ts(6385)
validator.d.ts(11, 4): The declaration was marked as deprecated here.
'valibotValidator' is deprecated.ts(6385)
validator.d.ts(11, 4): The declaration was marked as deprecated here.
const form = useForm({
defaultValues: {
emailAddress: '',
password: '',
},
validators: {
onSubmitAsync: async ({ value }) => {
...
},
},
validatorAdapter: valibotValidator(),
});
const form = useForm({
defaultValues: {
emailAddress: '',
password: '',
},
validators: {
onSubmitAsync: async ({ value }) => {
...
},
},
validatorAdapter: valibotValidator(),
});
What's the resolution here? Thanks!
5 Replies
generous-apricot
generous-apricot8mo ago
Valibot supports the Standard Schema afaik - so you can just remove the validatorAdapter and you should be good to go
xenial-black
xenial-blackOP8mo ago
I haven't had time to look into this at all. I've pretty much blind moved from Zod to Valibot. What's Standard Schema ? Do you mean the one that's assigned to the Field?
generous-apricot
generous-apricot8mo ago
That should be the release that introduced Standard Schema Support https://github.com/TanStack/form/releases/tag/v0.40.0
GitHub
Release v0.40.0 · TanStack/form
Version 0.40.0 - 12/10/24, 9:55 PM Changes Feat native support for standard schema libraries (#1020) (6a82b7f) by Leonardo Montini Packages @tanstack/form-core@0.40.0 @tanstack/zod-form-adapter@...
generous-apricot
generous-apricot8mo ago
Form and Field Validation | TanStack Form React Docs
At the core of TanStack Form's functionalities is the concept of validation. TanStack Form makes validation highly customizable: You can control when to perform the validation (on change, on input, on...
xenial-black
xenial-blackOP8mo ago
Awesome, let me take a look. Thanks!

Did you find this page helpful?