A vuejs validator for .NET forms.
npm install vue-dotnet-validatorA vuejs validator for .NET forms.

This package makes it possible to use .NET model validation using vue.js instead of the default jQuery validator way that microsoft dictates.
The idea is that you use this on your server rendered HTML forms which include the data-attributes that are generated by C#'s razor template engine.
This package (from version 0.3.0 and up) requires vue 2.x.
npm install vue-dotnet-validator
Using this library requires changes on two places in your application, JavaScript and your razor cshtml templates.
This registers the vue components so that Vue.js knows what to activate.
Base usage:
``JavaScript
import { validatorGroup, validator } from 'vue-dotnet-validator';
Vue.component('validator-group', validatorGroup);
Vue.component('validator', validator());
`
The following code should be added to your cshtml forms. This makes sure that the validator logic is activated and adds the required references to DOM-nodes.
`HTML`
#### Explanation of the cshtml changes:
This behaves as a container for the entire form, so we can maintain the state of the entire form and the validation status of the input fields in it.
v-on:submit="validate"
This adds an event listener to the