Skip to content
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

nuxt 3, $each helper does not work? #1231

Open
cvalues opened this issue Mar 4, 2024 · 0 comments
Open

nuxt 3, $each helper does not work? #1231

cvalues opened this issue Mar 4, 2024 · 0 comments

Comments

@cvalues
Copy link

cvalues commented Mar 4, 2024

Hi all,

i am facing problems with the $each helper in my project.

<li v-for="(item, index) in items.alldays" >
        <InputText
                            :class="['w-full mb-3', { 'p-invalid': v$.alldays.$each[index].time.$error  }]"
                            aria-describedby="dd-error"
                            @change="v$.alldays.$each[index].time.touch()"
                            v-model="item.time"
                            id="time" type="text"
                          />
</li> 
                         
   const rules = computed(() => ({
    alldays: {
      $each: helpers.forEach({
                time: {
                  required: helpers.withMessage('This is required!', required),
                },
             })
    }
  }));

  const v$ = useVuelidate(rules, job);        

I tried several things but nothing works (since hours). I think it is a syntax problem, but i don't know whats wrong.

thx for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant