kazupon / vue-validator

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

Use parameter for dynamic name if arg is not provided #129

Closed revati closed 8 years ago

revati commented 8 years ago

Can use validation-name to set dynamic field name

<validator name="validation1">
  <input v-validate="['required']" :validation-name="fieldName">
  <span v-show="$validation1[fieldName].required">Required your name.</span>
</validator>

This can fix https://github.com/vuejs/vue-validator/issues/46

kazupon commented 8 years ago

Thank you for pull request.

I've published the now. https://github.com/vuejs/vue-validator/releases/tag/v2.0.0-alpha.11

Please try it. :smile_cat: