kazupon / vue-validator

:white_check_mark: Validator component for Vue.js
MIT License
2.19k stars 431 forks source link

v-for can't effect #277

Closed jackPanyj closed 8 years ago

jackPanyj commented 8 years ago

this is my code

div.row-input
          h2 title
          input(type='number' v-model='perDayTimeCount'   v-validate:per-day-time-count="{max: feilds.daily_amount, required: true}")
          span.error(v-if='$validation.perDayTimeCount.max') you got an error
        template(v-for='i in perDayTimeCount')
          div.row-input
            h2 {{i + 1}} title
            input(type='text' v-model='titles[i]' v-validate:title="{required: true, maxlength: 4}")
          div.row-input
            h2 {{i + 1}}time
            span.datetime
              input.w120(type='text' class="time-picker-{{i}}" @click='showTime')
          div.row-input
            h2 {{i + 1}} amount
            span(data-unit='个')
              input(type='number' v-model='amounts[i]')

perDayTimeCount' data is from the input feild. when i use v-validate:title it doesn't effect

nandin-borjigin commented 8 years ago

maybe a reproduction link will motivate people to look into your problem

nandin-borjigin commented 8 years ago

[note for future visitors] refer to this issue for solution #280, similar #249