-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the bug
This code here is throwing an error for a boolean
checkbox which is being provided the name b:firstLog
.
kit/packages/kit/src/runtime/form-utils.svelte.js
Lines 68 to 79 in 1ef73e8
const path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/; | |
/** | |
* @param {string} path | |
*/ | |
export function split_path(path) { | |
if (!path_regex.test(path)) { | |
throw new Error(`Invalid path ${path}`); | |
} | |
return path.split(/\.|\[|\]/).filter(Boolean); | |
} |
Error
The error occurs when the checkbox is toggled.
Uncaught Error: Invalid path b:firstLog
at split_path (form-utils.svelte.js?v=07427efc:66:9)
at HTMLFormElement.<anonymous> (form.svelte.js?v=07427efc:415:19)
Reproduction
See the browser console and try toggling the checkbox.
https://stackblitz.com/edit/sveltejs-kit-template-default-zfggavbm?file=package.json,src%2Froutes%2Ftest.remote.js,src%2Froutes%2F%2Bpage.svelte
System Info
System:
OS: macOS 26.0.1
CPU: (16) arm64 Apple M4 Max
Memory: 1.36 GB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - /Users/sillvva/.nvm/versions/node/v22.12.0/bin/node
npm: 10.9.0 - /Users/sillvva/.nvm/versions/node/v22.12.0/bin/npm
pnpm: 10.11.0 - /Users/sillvva/.nvm/versions/node/v22.12.0/bin/pnpm
bun: 1.2.20 - /Users/sillvva/.bun/bin/bun
Browsers:
Firefox: 140.0.2
Safari: 26.0.1
npmPackages:
@sveltejs/adapter-node: ^5.3.3 => 5.3.3
@sveltejs/kit: ^2.46.1 => 2.46.1
@sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1
svelte: ^5.39.9 => 5.39.9
vite: ^7.1.9 => 7.1.9
Severity
blocker
Additional Information
No response
teemingc
Metadata
Metadata
Assignees
Labels
No labels