forked from hueitan/angular-validation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.json
7 lines (7 loc) · 5.19 KB
/
params.json
1
2
3
4
5
6
7
{
"name": "Angular-validation",
"tagline": "Client Side Validation for AngularJS - http://huei90.github.io/angular-validation/",
"body": "angular-validation 1.3.3\r\n=========================\r\n[![NPM version](https://badge.fury.io/js/angular-validation.svg)](http://badge.fury.io/js/angular-validation)\r\n[![Build Status](https://travis-ci.org/huei90/angular-validation.png?branch=master)](https://travis-ci.org/huei90/angular-validation)\r\n[![Code Climate](https://codeclimate.com/github/huei90/angular-validation/badges/gpa.svg)](https://codeclimate.com/github/huei90/angular-validation)\r\n[![devDependency Status](https://david-dm.org/huei90/angular-validation/dev-status.png)](https://david-dm.org/huei90/angular-validation#info=devDependencies)\r\n[![Gitter chat](https://badges.gitter.im/huei90/angular-validation.png)](https://gitter.im/huei90/angular-validation)\r\n\r\nClient-side Validation should be simple and clean.\r\n<br/>Don't let Client-side Validation dirty your controller.\r\n\r\nSetup your Validation on config phase by using some rules [(example)](https://github.com/huei90/angular-validation/blob/master/dist/angular-validation-rule.js)\r\n<br/>If you prefer schema over html attributes , try [angular-validation-schema\r\n](https://github.com/thetutlage/angular-validation-schema) [(Demo)](http://plnkr.co/edit/X56HEsDYgYoY8gbSj7cu?p=preview)\r\n<br/>And add Validation in your view only.\r\n\r\nangularjs 1.2.x support to version [angular-validation 1.2.x](https://github.com/huei90/angular-validation/tree/v1.2.x) <br/>\r\nangularjs 1.3.x support after version angular-validation 1.3.x\r\n\r\nRequirement\r\n-----\r\n[AngularJS](http://angularjs.org) 1.2.x (for [angular-validation 1.2.x](https://github.com/huei90/angular-validation/tree/v1.2.x)) <br/>\r\n[AngularJS](http://angularjs.org) 1.3.x (for [angular-validation 1.3.x](https://github.com/huei90/angular-validation/tree/master))\r\n\r\nDEMO\r\n-----\r\nhttp://huei90.github.io/angular-validation/\r\n\r\nhttp://plnkr.co/edit/rjIIkX (Bootstrap framework)\r\n\r\nLicense\r\n-----\r\nMIT\r\n\r\nInstall\r\n-----\r\nInstall with npm\r\n\r\n```\r\nnpm install angular-validation\r\n```\r\n\r\nor with bower\r\n\r\n```\r\nbower install angular-validation\r\n```\r\n\r\nUsing angular-validation\r\n---\r\n```html\r\n<script src=\"dist/angular-validation.js\"></script>\r\n<script src=\"dist/angular-validation-rule.js\"></script>\r\n```\r\nUsing angular-validation with bower\r\n---\r\n```html\r\n<script src=\"lib/angular-validation/dist/angular-validation.js\"></script>\r\n<script src=\"lib/angular-validation/dist/angular-validation-rule.js\"></script>\r\n```\r\n```js\r\nangular.module('yourApp', ['validation']);\r\n\r\n// including your validation rule\r\nangular.module('yourApp', ['validation', 'validation.rule']);\r\n```\r\n\r\nWriting your First Code\r\n====\r\n```html\r\n<form name=\"Form\">\r\n <div class=\"row\">\r\n <div>\r\n <label>Required</label>\r\n <input type=\"text\" name=\"required\" ng-model=\"form.required\" validator=\"required\">\r\n </div>\r\n <div>\r\n <label>Url</label>\r\n <input type=\"text\" name=\"url\" ng-model=\"form.url\" validator=\"required, url\">\r\n </div>\r\n <button validation-submit=\"Form\" ng-click=\"next()\">Submit</button>\r\n <button validation-reset=\"Form\">Reset</button>\r\n </div>\r\n</form>\r\n```\r\n\r\n[Documentation API](https://github.com/huei90/angular-validation/blob/master/API.md)\r\n\r\nBuilt-in validation <small>in angular-validation-rule</small>\r\n===\r\n\r\n1. Required\r\n2. Url\r\n3. Email\r\n4. Number\r\n5. Min length\r\n6. Max length\r\n\r\n5 and 6 require you to pass an inline parameter to set the length limit. Eg, `maxlength=6`.\r\n\r\nAnyone can give a `PR` for this angular-validation for more `built-in validation`\r\n\r\n\r\nIntegrating with Twitter Bootstrap\r\n=====\r\n\r\nTo integrate this package with Bootstrap you should do the following.\r\n\r\n\r\nAdd the following LESS to your project\r\n\r\n```css\r\n.ng-invalid.ng-dirty{\r\n .has-error .form-control;\r\n}\r\n\r\nlabel.has-error.control-label {\r\n .has-error .control-label;\r\n}\r\n\r\n```\r\n\r\nChange the Error HTML to something like:\r\n\r\n```javascript\r\n$validationProvider.setErrorHTML(function (msg) {\r\n return \"<label class=\\\"control-label has-error\\\">\" + msg + \"</label>\";\r\n});\r\n```\r\n\r\nYou can add the bootstrap class `.has-success` in a similar fashion.\r\n\r\nTo toggle `.has-error` class on bootstrap `.form-group` wrapper for labels and controls, add:\r\n\r\n```javascript\r\nangular.extend($validationProvider, {\r\n validCallback: function (element){\r\n $(element).parents('.form-group:first').removeClass('has-error');\r\n },\r\n invalidCallback: function (element) {\r\n $(element).parents('.form-group:first').addClass('has-error');\r\n }\r\n});\r\n```\r\n\r\nCHANGELOG\r\n=====\r\nSee [release](https://github.com/huei90/angular-validation/releases)\r\n\r\nCONTRIBUTORS\r\n=====\r\nThanks for all [contributors](https://github.com/huei90/angular-validation/graphs/contributors)\r\n",
"google": "",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}