sveltekit-superforms
sveltekit-superforms copied to clipboard
feat: Add typia adapter
fixes: #440
Hi! I made an adapter for typia!!
Changes
-
Added a new adapter file
src/lib/adapters/typia.tswhich definestypiaandtypiaClientadapter creation functions. These allow using typia for server-side and client-side form validation respectively. -
Updated
src/lib/adapters/adapters.tsto include 'typia' as a supported validation library type. -
Added new test cases in
src/tests/superValidate.test.tsto test form validation using the typia adapter. The tests cover validating fields like email, strings with no whitespace, arrays with min length, etc. -
Modified
vite.config.tsto include the@ryoppippi/unplugin-typiaVite plugin.
This allows users to leverage typia with superforms
Please let me know if you have any feedback or suggestions to improve the typia integration.