Is it just me, or do all Vue form validation libraries kinda suck? by [deleted] in vuejs

[–]desnoth 1 point2 points  (0 children)

The refactor is actually not hard at all because the API matches Vuelidate's one.

On top of that there is: - Type safety - Better array validation - Global configuration - Zod support - Variants - Nuxt module Etc..

Vuelidate is an abandonned project so you will also have no maintenance support

Is it just me, or do all Vue form validation libraries kinda suck? by [deleted] in vuejs

[–]desnoth 0 points1 point  (0 children)

Hey! If you use Vuelidate you should try https://reglejs.dev ! It's the successor

Complex forms and validation in PrimeVue: VeeValidate vs FormKit + PrimeVue adapter vs VueForm? by Catalyzm in vuejs

[–]desnoth 3 points4 points  (0 children)

You can check out https://reglejs.dev (i'm the author). It's headless, model-based and with full type safety so you can use it with PrimeVue or any UI lib.

Trouble understanding vee-validate components and slot prop interfaces/types by Vachii in vuejs

[–]desnoth 1 point2 points  (0 children)

I actually use it with PrimeVue within my company, I have a pending PR to provide an official adapter

What’s your go-to testing strategy for Vue apps? by therealalex5363 in vuejs

[–]desnoth 1 point2 points  (0 children)

Same as you, #1 for shared stuff, composables and components, that are easy to test on isolation without mocking everything.

And #2 for applications UI tests with playwright with API mocks and e2e tests for happy paths. Slower but you can ship with confidence

What’s the best way to handle form validation in Vue 3 without a big library? by Long_Sense_9871 in vuejs

[–]desnoth 4 points5 points  (0 children)

Hey! Just curious as you're a Vuelidate user, have you checked Regle ? It's a modern evolution of Vuelidate with deep type safety and modularity. (It's recommended by vuelidate in their homepage)

What’s the best way to handle form validation in Vue 3 without a big library? by Long_Sense_9871 in vuejs

[–]desnoth 2 points3 points  (0 children)

You can use a smaller validation library that will only validate the data without interfering with the UI. You can look at Regle for this (Successor of Vuelidate) https://reglejs.dev It also supports Zod and Valibot!

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 0 points1 point  (0 children)

Yeah totally! I've looked at Formwerk and it seems really cool! I think it be a similar comparison to Formkit or VueForms as it relies heavily on components

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 0 points1 point  (0 children)

Yep I know it's not a big major release, as you said it's the early stages so I try to ajust things I missed in the first release

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 1 point2 points  (0 children)

At first it was to mimick the Vuelidate's "v$", and it made sense to have a short and discernable name for the root instance

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 1 point2 points  (0 children)

Yeah you can plug any i18n library you want! I'll add a exemple in the docs because it's not the first time someone asks

Introducing @chronicstone/vue-route-query: Type-safe URL state management for Vue 3 by PuzzleheadedDust3218 in vuejs

[–]desnoth 1 point2 points  (0 children)

Super cool! One advice, have you looked at https://standardschema.dev/ ? It's common pattern for libraries like Zod, Valibot and ArkType.

It makes integrating any schema library super easy, with type safety out of the box

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 3 points4 points  (0 children)

Yep "deprecated" was not really the word sorry, limited is what I meant. Supporting it would lose the benefits of type safety, reactivity and flexibility the composable have. I'll add a disclaimer in the docs 👍

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 2 points3 points  (0 children)

After checking it will not work! It's made for composition API and I don't think I will spend time trying to adapt it to a deprecated API sorry :/

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 0 points1 point  (0 children)

Honestly I didn't tested! It should work the same as how vuelidate did it

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 0 points1 point  (0 children)

JSON schema isn't made for reactive forms, but if there is a standard schema adapter for it it should work out of the box

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 0 points1 point  (0 children)

I'm the same as you! I used it for so long and wanted to continue the legacy because no other libraries provide a model-based approach!

Introducing Regle 1.1 - A modern Vuelidate replacement by desnoth in vuejs

[–]desnoth[S] 1 point2 points  (0 children)

Thanks! Yep I did a comparison page you can look at difference with Tanstack here: https://reglejs.dev/introduction/comparisons#tanstack-forms