lewyuburi / nuxt-validate

Simple Nuxt input validation module using vee-validate
https://www.npmjs.com/package/nuxt-validate
MIT License
122 stars 19 forks source link

Access to validation components #16

Open smajl opened 5 years ago

smajl commented 5 years ago

Does this module provide easy access to validation components (ValidationObserver, ValidationProvider and their instances)? I don't think so, at least I was unable to import them successfully from nuxt-validate therefore I ended up using vee-validate "manually" as my custom plugin, so I can do this now:

import { Component, Vue } from 'vue-property-decorator'
import { ValidationObserver, ValidationObserverInstance, ValidationProvider } from 'vee-validate'

@Component({
  components: {
    ValidationObserver,
    ValidationProvider,
  },
})
export default class Login extends Vue {
  $refs: {
    form: ValidationObserverInstance;
  }
  ...
}

Am I missing something? If not, would it be possible to make this available through nuxt-validate as well?

lewyuburi commented 5 years ago

Maybe I can help this weekend, I need to documente me about ValidationObserver, ValidationObserverInstance and ValidationProvider 🤔