A complete pack for forms validator, mask fields and messages errors for AngularJS
We use karma and grunt to ensure the quality of the code.
npm install -g grunt-cli
npm install
bower install
grunt
We use bower for dependency management. Add
dependencies: {
"qvalidator": "latest"
}
To your components.json
file. Then run
bower install
This will copy the qvalidator files into your components
folder, along with its dependencies. Load the script files in your application:
<script src="bower_components/angular-qvalidator/qvalidator.js"></script>
Add the QValidator module as a dependency to your application module:
var myAppModule = angular.module('MyApp', ['qs.utils.qvalidator'])
Apply the directive to your input elements.
<input name="n" ng-model="form.n" type="text" style="left: 165px; width: 300px;" onkeydown="tecla()"
qs-messages="{title: 'Nombre', selectMessages: ['required', 'onlyChars', {minLength: 5}]}"
placeholder="Indique su nombre..." autofocus/>
<input name="e" ng-model="form.e" type="email" style="left: 165px; width: 300px;"
qs-messages="{title: 'Correo electrónico', selectMessages: ['required', 'onlyChars', {minLength: 5}]}"
placeholder="Indique su corrreo electrónico..." required/>
etc.
working...