ES6验证:Vuetify

时间:2018-08-14 12:30:10

标签: vue.js ecmascript-6 vuetify.js

我有办法检查v-select输入的值吗?

这是我的代码:

验证规则

item_classification_id:[
       v => v.value == -1 || 'Classification is required'
]

验证v-select

<v-select

:rules="itemRules.item_classification_id"
v-model="item.item_classification_id"                                                       
:items="itemClassifications"                                                         
label="Classification"
item-text="name"
item-value="id"
   ></v-select>

0 个答案:

没有答案