Custom Components Validation

You might have a custom component that you want to treat as an input. Like a custom input field, it would have its own validator instance, but you want to validate it in the parent scope because it is simply just an input with some whistles on top. You can achieve this by using the directive normally like you would on a regular input element, but you must make sure that your component satisfies the following:

  • Must emit an input event whenever the value changes.
  • Should have a value and name getters define in the components $_veeValidate ctor options alternatively it can use the data-vv-name and data-vv-value-path as fallbacks.

Edit VeeValidate Examples

You can find a step-by-step guide on creating validatable components by reading this article.