We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fef61d8 commit fc0a31fCopy full SHA for fc0a31f
src/lib/stringPath.ts
@@ -1,8 +1,6 @@
1
import type { FieldPath } from './index.js';
2
3
-export function splitPath<T extends object>(
4
- path: StringPath<T> | StringPathLeaves<T>
5
-) {
+export function splitPath<T extends object>(path: string) {
6
return path
7
.toString()
8
.split(/[[\].]+/)
src/lib/superValidate.ts
@@ -78,7 +78,7 @@ export function setError<T extends ZodValidation<AnyZodObject>>(
78
? errArr
79
: form.errors._errors.concat(errArr);
80
} else {
81
- const realPath = splitPath(path);
+ const realPath = splitPath(path as string);
82
83
const leaf = traversePath(
84
form.errors,
0 commit comments