-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add typia adapter #441
base: main
Are you sure you want to change the base?
Conversation
This commit includes the following changes: - Typia added to devDependencies in package.json - New npm script 'prepare' added for Typia patching - New registry '@jsr:registry' added in .npmrc for jsr - UnpluginTypia included in vite.config.ts plugins
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This commit introduces a new validation adapter for the 'typia' library. The adapter is implemented in 'src/lib/adapters/typia.ts'. It includes functions for both server-side and client-side validation. The implementation also includes a test case in 'src/tests/superValidate.test.ts' to ensure the adapter works as expected.
6ab1d00
to
77889a7
Compare
This commit introduces 'typia' as an optional dependency in the package.json file. This is to ensure that the project can optionally utilize the features provided by 'typia'.
This commit updates the version of @ryoppippi/unplugin-typia from v0.2.2 to v0.3.3 in both package.json and pnpm-lock.yaml. It also adds a new field "packageManager" in package.json with the value "[email protected]+sha256. 30a1801ac4e723779efed13a21f4c39f9eb6c9fbb4ced101bce06b422593d7c9".
The @ryoppippi/unplugin-typia dependency has been upgraded from v0.3.3 to v0.3.7. This includes updates in the package.json and pnpm-lock.yaml files. The upgrade may include bug fixes, performance improvements, and new features.
c81d554
to
22ecefe
Compare
Hi, as I mentioned earlier, the extra configuration ( |
How about writing how to use it in the Documentation and making the users aware of it, so that it is not a problem? |
It's more work than I have time for at the moment, but you can make a PR to the documentation to speed things up: https://github.com/ciscoheat/superforms-web |
NIce Thanks! |
fixes: #440
Hi! I made an adapter for typia!!
Changes
Added a new adapter file
src/lib/adapters/typia.ts
which definestypia
andtypiaClient
adapter creation functions. These allow using typia for server-side and client-side form validation respectively.Updated
src/lib/adapters/adapters.ts
to include 'typia' as a supported validation library type.Added new test cases in
src/tests/superValidate.test.ts
to 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.ts
to include the@ryoppippi/unplugin-typia
Vite plugin.This allows users to leverage
typia
withsuperforms
Please let me know if you have any feedback or suggestions to improve the typia integration.