You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: changelog.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
Angular-Validation change logs
2
2
3
+
1.3.36 (2015-07-20) Enhancement #47 - New option to use the ControllerAs syntax. Also fixed issue #48.
3
4
1.3.35 (2015-07-15) Deprecated old implentation of `regex:...:regex` (though it still works) by a new and much better implementation of `pattern=` validator. Converted all the rules from string pattern to regex pattern (when possible) defined in `angular-validation.js`. Also fixed issue #45 on email check.
4
5
1.3.34 (2015-07-08) Merge pull request #44 - Adding support to brazilian portuguese language.
5
6
1.3.33 (2015-07-02) Reset isolatedScope on route change
Copy file name to clipboardExpand all lines: readme.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
#Angular Validation (Directive / Service)
2
-
`Version: 1.3.35`
2
+
`Version: 1.3.36`
3
3
### Form validation after user inactivity of default 1sec. (customizable timeout)
4
4
5
5
Forms Validation with Angular made easy! Angular-Validation is an angular directive/service with locales (languages) with a very simple approach of defining your `validation=""` directly within your element to validate (input, textarea, etc) and...that's it!!! The directive/service will take care of the rest!
@@ -85,6 +85,7 @@ All the documentation has been moved to the Wiki section, see the [github wiki](
85
85
* Properties & Options
86
86
*[Inputs (all local options)](https://github.com/ghiscoding/angular-validation/wiki/Inputs-(local-options))
validationCommon.prototype.getFormElementByName=getFormElementByName;// get the form element custom object by it's name
67
68
validationCommon.prototype.getFormElements=getFormElements;// get the array of form elements (custom objects)
69
+
validationCommon.prototype.getGlobalOptions=getGlobalOptions;// get the global options used by all validators (usually called by the validationService)
68
70
validationCommon.prototype.isFieldRequired=isFieldRequired;// return boolean knowing if the current field is required
69
71
validationCommon.prototype.initialize=initialize;// initialize current object with passed arguments
70
72
validationCommon.prototype.mergeObjects=mergeObjects;// merge 2 javascript objects, Overwrites obj1's values with obj2's (basically Object2 as higher priority over Object1)
@@ -194,6 +196,14 @@ angular
194
196
return_formElements;
195
197
}
196
198
199
+
/** Get global options used by all validators
200
+
* @param object attrs: global options
201
+
* @return object self
202
+
*/
203
+
functiongetGlobalOptions(){
204
+
return_globalOptions;
205
+
}
206
+
197
207
/** Initialize the common object
198
208
* @param object scope
199
209
* @param object elm
@@ -263,13 +273,25 @@ angular
263
273
264
274
self.scope.$validationSummary=_validationSummary;
265
275
266
-
// and also save it inside the current scope form (if found)
276
+
// overwrite the scope form (if found)
267
277
if(!!form){
268
278
// since validationSummary contain errors of all forms
269
279
// we need to find only the errors of current form and them into the current scope form object
parentForm.$name=form.name;// make sure it has a $name, since we use that variable later on
825
+
}
826
+
returnparentForm;
771
827
}
772
-
returnparentForm;
773
828
}
774
829
}
775
830
776
831
// falling here with a form name but without a form object found in the scope is often due to isolate scope
777
832
// we can hack it and define our own form inside this isolate scope, in that way we can still use something like: isolateScope.form1.$validationSummary
778
833
if(!!form&&!!form.name){
779
-
returnself.scope[form.name]={$name: form.name,specialNote: 'Created by Angular-Validation for Isolated Scope usage'};
834
+
varobj={$name: form.name,specialNote: 'Created by Angular-Validation for Isolated Scope usage'};
throw'checkFormValidity() requires a valid Angular Form or $scope object passed as argument to work properly (ex.: $scope.form1 OR $scope).';
146
+
throw'checkFormValidity() requires a valid Angular Form or $scope/vm object passed as argument to work properly, for example:: fn($scope) OR fn($scope.form1) OR fn(vm) OR fn(vm.form1)';
142
147
}
143
148
144
149
// loop through $validationSummary and display errors when found on each field
throw'clearInvalidValidatorsInSummary() requires a valid Angular Form or $scope object passed as argument to work properly (ex.: $scope.form1 OR $scope).';
178
+
throw'clearInvalidValidatorsInSummary() requires a valid Angular Form or $scope/vm object passed as argument to work properly, for example:: fn($scope) OR fn($scope.form1) OR fn(vm) OR fn(vm.form1)';
throw'removeValidator() only works with Validation that were defined by the Service (not by the Directive) and requires a valid Angular Form or $scope object passed as argument to work properly (ex.: $scope.form1 OR $scope).';
204
+
throw'removeValidator() only works with Validation that were defined by the Service (not by the Directive) and requires a valid Angular Form or $scope/vm object passed as argument to work properly, for example:: fn($scope) OR fn($scope.form1) OR fn(vm) OR fn(vm.form1)';
200
205
}
201
206
202
207
// Note: removeAttr() will remove validation attribute from the DOM (if defined by Directive), but as no effect when defined by the Service
0 commit comments