Type check failed for prop "minLen"
eugeene opened this issue · 3 comments
eugeene commented
When I use minLen or maxLen, I get this message:
vue.js:634 [Vue warn]: Invalid prop: type check failed for prop "minLen". Expected Number with value 5, got String with value "5".
Vue.component("frm-product-suggest", {
template: `
<span class="inp__fix">
<input type="hidden" name="product_id" :value="id" required>
<vue-suggestion
inputClasses="inp__text"
placeholder="Napište model, nebo značku zboží"
v-model="product"
minLen=5
:itemTemplate="tpl"
:items="searchResult"
:setLabel="setLabel"
@changed="onSearch"
@selected="onSelected">
</vue-suggestion>
</span>`
})
Any ideas? Thanx!
eugeene commented
when i use :minLen=5 it works, but @Changed is called every time the input changes, so I have to check the input parameter for length.
iamstevendao commented
iamstevendao commented
@eugeene to pass a number you need to use :minLen="5"