Skip to content

A complete pack for forms validator, mask fields and messages errors for AngularJS

License

Notifications You must be signed in to change notification settings

jlmayoral/angular-qvalidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QValidator Module, with services and directives.

A complete pack for forms validator, mask fields and messages errors for AngularJS

Requirements

Testing

We use karma and grunt to ensure the quality of the code.

npm install -g grunt-cli
npm install
bower install
grunt

Usage

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.

Options

working...

About

A complete pack for forms validator, mask fields and messages errors for AngularJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published