【发布时间】:2018-05-21 12:36:54
【问题描述】:
Vee Validate dynamic element with custom message in common error box.
如果存在验证错误,我需要在页面顶部单独显示错误消息并在输入字段上显示突出显示。如何检查组件中发生的任何验证错误。
我想将它创建为一个组件,保存按钮在主页上,并在保存之前验证每个组件。
<div>Need to show the error mesage here.</div>
<div id="product">
<dl v-for="(items, index) in configurations">
{{items.assemblyconfigurationname}}
<input type="text" :name="'assemblyconfigurationvalue_' + index"
v-validate="'required'" :class="[{ error_input: errors.has('assemblyconfigurationvalue_' + index)}]" v-model="items.assemblyconfigurationvalue">
</dl>
【问题讨论】:
标签: vue.js vee-validate