VueJS Vee-Validate 验证没有发生

问题描述

我正在使用 vee validate 来验证一个日期是否晚于另一个日期

  <app-calendar-picker
                ref="afterTarget"
                v-model="residence.startDate"
                v-validate="'required|date_format:yyyy-mm-dd|'"
                :data-vv-as="$t('pages.public.form.components.additional_data_component.from')"
                :disabled="disabled"
                :label="$t('pages.public.form.components.additional_data_component.from')"
                :name="residence.position+nameKey+'.startDate'"
                :parent-errors="errors"
                class="col-6"
                format="YYYY-MM-DD"
                type="date"
              />
              <app-calendar-picker
                v-model="residence.endDate"
                v-validate="'required|date_format:yyyy-mm-dd|after:afterTarget'"
                :data-vv-as="$t('pages.public.form.components.additional_data_component.until')"
                :disabled="disabled"
                :label="$t('pages.public.form.components.additional_data_component.until')"
                :name="residence.position+nameKey+'.endDate'"
                :parent-errors="errors"
                class="col-6"
                format="YYYY-MM-DD"
                type="date"
              />

问题是 vee validate 没有看到第二个日期在第一个日期之前并且验证从未发生 谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)