question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FeathersVuexFormWrapper with Vuelidate

See original GitHub issue

It would be wonderful to have an example of using the FeathersVuexFormWrapper component with what seems to be one of, or the most popular validation library: vuelidate. Maybe it’s not possible, but it would seemingly be the act of making the clone available to vuelidate.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ericirishcommented, Jan 24, 2020

Thanks for the response and all of the hard work @marshallswain!

2reactions
marshallswaincommented, Jan 14, 2020

This is definitely possible, already, but probably not in the way you might be thinking. Vuelidate validations would be handled inside the nested component. In the case of the below example, Vuelidate would be used inside the SomeEditor component:

<template>
  <FeathersVuexFormWrapper :item="currentItem" watch>
    <template v-slot="{ clone, save, reset, remove }">
      <SomeEditor
        :item="clone"
        @save="save().then(handleSaveResponse)"
        @reset="reset"
        @remove="remove"
      ></SomeEditor>
    </template>
  </FeathersVuexFormWrapper>
</template>

By the time a form submission reaches the FeathersVuexFormWrapper, the data should already have been validated.

I’m working on another awesome project for the FeathersJS community right now, which will really improve people’s experience with Feathers-Vuex, so I won’t make time for this for a week or so, maybe more. I’m going to keep this open because this is a great idea to add to the common patterns section of the docs.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with Forms | FeathersVuex
The FeathersVuexFormWrapper and FeathersVuexInputWrapper are renderless components which assist in connecting your feathers-vuex data to a form.
Read more >
FeathersVuexFormWrapper Example · Issue #354 - GitHub
We have tried to set breakpoints but we can not seem to get them to stop on the breakpoints. The page won't even...
Read more >
Vuelidate | A Vue.js model validation library
Simple, lightweight model-based validation for Vue.js.
Read more >
Advanced usage - Vuelidate
A simple, but powerful, lightweight model-based validation for Vue.js 3 and 2.
Read more >
Alinex GUI - GitLab
The FeathersVuexFormWrapper component uses the "clone and commit" pattern to connect a single ... Building on the same ideas as the FeathersVuexFormWrapper, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found