ciscoheat / sveltekit-superforms

Making SvelteKit forms a pleasure to use!
https://superforms.rocks
MIT License
2.14k stars 64 forks source link

JSONSchema using schemasafe adaptor failing runtime in SPA mode #484

Open h7kanna opened 2 days ago

h7kanna commented 2 days ago

Description Schemasafe adapter throwing runtime error

sveltekit-superforms….js?v=e66d4914:2613 Uncaught (in promise) TypeError: validator is not a function
    at cachedValidator (sveltekit-superforms…?v=e66d4914:2613:30)
    at async Object.validate (sveltekit-superforms…?v=e66d4914:2626:25)
    at async Form_validate (sveltekit-superforms…?v=0dbc1997:2868:16)
    at async Form_clientValidation (sveltekit-superforms…?v=0dbc1997:2948:20)

App is created by following the documentation at https://superforms.rocks/concepts/spa#without-a-pagets-file

SvelteLab sample https://www.sveltelab.dev/?provider=github&owner=h7kanna&repo=superforms-schemasafe

ciscoheat commented 2 days ago

This is working for me when I submit (without constraints, to see the JSON Schema error messages), how to reproduce it?

h7kanna commented 1 day ago

This is working for me when I submit (without constraints, to see the JSON Schema error messages), how to reproduce it?

Screenshot 2024-09-20 at 9 25 38 AM