kazupon / vue-validator

:white_check_mark: Validator component for Vue.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to validate this feilds

jackPanyj opened this issue · comments

when some elements is rendered after user input a value , the validation doesn't work.

this is a reproduction

http://codepen.io/jackpan/pen/yJpzPG

in this demo, the input that rendered after user input does'n work

similar #249
The use-case is mostly identical, so you can refer to my comment on this issue.

The point is you are rendering a list of inputs using v-for directive but assigning a static validation field name ( in your demo, 'amount'), so the last item of the list overrides the former ones. Dynamic field names are needed in this case.

There is my modification on your codepen

This issue can be closed I think @kazupon

@Nandiin thank you i closed it