Errors being shown in $silentErrors instead of $errors

54 Views Asked by At

enter image description here

  watchEffect(() => {
    if (selectedType.value === "individual") {
        v$ = useVuelidate(individualRules, individual, { $autoDirty:     true });
        console.log(v$.value);
    } else if (selectedType.value === "company") {
        v$ = useVuelidate(companyRules, company, { $autoDirty: true });
        console.log(v$.value);
    }
});

this is how am trying to track validation rules from the rules validations but it seems the errors[] isn't updated causing errors not to be seen on the screen when the validation has failed i have tried adding the options { $autodirty :true } as suggested from an issue that was posted no luck so far .. i would like to be guided on how to update the errors[] so that when not empty they are shown on the screen.

<div class="col-span-6 sm:col-span-3">
  <label class="block text-sm font-medium text-gray-700">
          Password Confirmation
   </label>
 <span class="text-red-900 text-md"
       v-for="err in v$.company_confirm_password.$errors"
             :key="err.$uid">
       {{ err.$message }}
 </span>

0

There are 0 best solutions below