Skip to content

Commit ff05977

Browse files
committed
fix #70 and update readme
1 parent 738d47f commit ff05977

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+7563
-1291
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,12 @@ To add your own custom validation types you will need to create a module that mi
163163
The validation-dynamically-defined directive gives you the ability to define a validation local to the scope alone.
164164

165165
[Here's a plunker with an example of how to accomplish this.](http://plnkr.co/edit/LDoYUM?p=preview)
166+
167+
###### Declare your own custom validation classes
168+
169+
Use these attributes for live validation success and fail, **validation-live-success-cls, validation-live-fail-cls**
170+
Ex:
171+
```
172+
<input validation-live-success-cls="text-success" validation-live-fail-cls="text-error" type="text" id="username" name="username" ng-model="user.username" validation-min-length="{template:'/views/errorTemplateOne.html', value:5}" validation-no-space="{message:'no space - custom message', value: true}" >
173+
174+
```

app/scripts/directives/customvalidation/customValidations.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,14 @@ angular_ui_form_validations = (function(){
129129
onValidationComplete = function (fieldIsValid, value, validationAttributeValue, $element, model, ngModelController, $scope, customOnSuccess) {
130130
if(fieldIsValid) {
131131
$element.addClass('ValidationLiveSuccess');
132+
$element.addClass($element.attr('validation-live-success-cls'));
133+
$element.removeClass($element.attr('validation-live-fail-cls'));
134+
132135
customOnSuccess.call(this, value, validationAttributeValue, $element, model, ngModelController, $scope);
133136
} else {
134137
$element.removeClass('ValidationLiveSuccess');
138+
$element.removeClass($element.attr('validation-live-success-cls'));
139+
$element.addClass($element.attr('validation-live-fail-cls'));
135140
}
136141
};
137142

dist/angular-ui-form-validation.js

Lines changed: 6780 additions & 3 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
22
"name": "angular-cookies",
3-
"version": "1.2.28",
3+
"version": "1.2.26",
44
"main": "./angular-cookies.js",
5-
"ignore": [],
65
"dependencies": {
7-
"angular": "1.2.28"
6+
"angular": "1.2.26"
87
},
98
"homepage": "https://github.com/angular/bower-angular-cookies",
10-
"_release": "1.2.28",
9+
"_release": "1.2.26",
1110
"_resolution": {
1211
"type": "version",
13-
"tag": "v1.2.28",
14-
"commit": "3bbaa39114fa18101a69ed368fb39bc2e1c2a78b"
12+
"tag": "v1.2.26",
13+
"commit": "0cefe0c4ca703bc8b137933ecdc36ace116ca270"
1514
},
16-
"_source": "git://github.com/angular/bower-angular-cookies.git",
15+
"_source": "https://github.com/angular/bower-angular-cookies.git",
1716
"_target": "~1.2.0",
1817
"_originalSource": "angular-cookies"
1918
}

dist/bower_components/angular-cookies/README.md

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,12 @@
1-
# packaged angular-cookies
1+
# bower-angular-cookies
22

3-
This repo is for distribution on `npm` and `bower`. The source for this module is in the
3+
This repo is for distribution on `bower`. The source for this module is in the
44
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngCookies).
55
Please file issues and pull requests against that repo.
66

77
## Install
88

9-
You can install this package either with `npm` or with `bower`.
10-
11-
### npm
12-
13-
```shell
14-
npm install angular-cookies
15-
```
16-
17-
Add a `<script>` to your `index.html`:
18-
19-
```html
20-
<script src="/node_modules/angular-cookies/angular-cookies.js"></script>
21-
```
22-
23-
Then add `ngCookies` as a dependency for your app:
24-
25-
```javascript
26-
angular.module('myApp', ['ngCookies']);
27-
```
28-
29-
Note that this package is not in CommonJS format, so doing `require('angular-cookies')` will
30-
return `undefined`.
31-
32-
### bower
9+
Install with `bower`:
3310

3411
```shell
3512
bower install angular-cookies
@@ -41,7 +18,7 @@ Add a `<script>` to your `index.html`:
4118
<script src="/bower_components/angular-cookies/angular-cookies.js"></script>
4219
```
4320

44-
Then add `ngCookies` as a dependency for your app:
21+
And add `ngCookies` as a dependency for your app:
4522

4623
```javascript
4724
angular.module('myApp', ['ngCookies']);

dist/bower_components/angular-cookies/angular-cookies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.2.28
2+
* @license AngularJS v1.2.26
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/

dist/bower_components/angular-cookies/angular-cookies.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"name": "angular-cookies",
3-
"version": "1.2.28",
3+
"version": "1.2.26",
44
"main": "./angular-cookies.js",
5-
"ignore": [],
65
"dependencies": {
7-
"angular": "1.2.28"
6+
"angular": "1.2.26"
87
}
98
}

dist/bower_components/angular-cookies/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-cookies",
3-
"version": "1.2.28",
3+
"version": "",
44
"description": "AngularJS module for cookies",
55
"main": "angular-cookies.js",
66
"scripts": {
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
22
"name": "angular-mocks",
3-
"version": "1.2.28",
3+
"version": "1.2.26",
44
"main": "./angular-mocks.js",
5-
"ignore": [],
65
"dependencies": {
7-
"angular": "1.2.28"
6+
"angular": "1.2.26"
87
},
98
"homepage": "https://github.com/angular/bower-angular-mocks",
10-
"_release": "1.2.28",
9+
"_release": "1.2.26",
1110
"_resolution": {
1211
"type": "version",
13-
"tag": "v1.2.28",
14-
"commit": "6bb9b6fd3fdb2eba0f64dc615fa55c5f0050af75"
12+
"tag": "v1.2.26",
13+
"commit": "0eda339dd42aba2628586f39d4806bcfb57fd6f4"
1514
},
16-
"_source": "git://github.com/angular/bower-angular-mocks.git",
15+
"_source": "https://github.com/angular/bower-angular-mocks.git",
1716
"_target": "~1.2.0",
1817
"_originalSource": "angular-mocks"
1918
}

0 commit comments

Comments
 (0)