Closed amiftachulh closed 3 months ago
Yes, this is the intended behavior at the moment. The reason for this is that transform
will mark your data as untyped if there are any issues. If we can't be sure that your data is typed, we can't run custom
because we guarantee type safety for the first argument of the passed function. With the rewrite in #502, I will provide a fix for this problem soon.
Cool, I'll wait for the fix
The fix will be a partialCheck
function (not implemented yet) that allows you to select the fields you want to validate. As long as these fields are typed, Valibot will perform the validation.
Hi, I have this schema.
I write displayName like that to convert empty string to null. But it will produce this error.
If I remove the
v.transform
like this.It will show the
v.forward
error. But I can't convert the empty string to null.Is this the intended behavior? If yes, what is the workaround?