Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit c72a2f0

Browse files
committed
Fixed issue #65 - invalid return on String.format()
1 parent 9d22084 commit c72a2f0

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-validation-ghiscoding",
3-
"version": "1.4.6",
3+
"version": "1.4.7",
44
"author": "Ghislain B.",
55
"description": "Angular-Validation Directive and Service (ghiscoding)",
66
"main": [

changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Angular-Validation change logs
22

3-
1.4.6 (2015-09-04) Accepted pull #64 - Update `es.json` translation file.
3+
1.4.7 (2015-09-08) Fixed issue #65 - invalid return value on function String.format()
4+
1.4.6 (2015-09-04) Accepted pull #64 - Update Spanish `es.json` translation file.
45
1.4.5 (2015-09-03) Fixed issue #63 - Custom Regex pattern should be greedy (instead of non-greedy), this was causing a problem when user add a `/` in his pattern and was stopping on first occurence.
56
1.4.4 (2015-08-21) Enhancement #59 - Added few Validators that are like Laravel for reusability. The `in` and `not_in` Validators are the most interesting.
67
1.4.3 (2015-08-18) Fixed issue #58 - multiple ControllerAs with Route change giving error of 'undefined' on $validationSummary.

dist/angular-validation.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-validation-ghiscoding",
3-
"version": "1.4.6",
3+
"version": "1.4.7",
44
"author": "Ghislain B.",
55
"description": "Angular-Validation Directive and Service (ghiscoding)",
66
"main": "app.js",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Angular Validation (Directive / Service)
2-
`Version: 1.4.6`
2+
`Version: 1.4.7`
33
### Form validation after user inactivity of default 1sec. (customizable timeout)
44

55
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!

src/validation-common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ angular
10291029
function stringPrototypeFormat() {
10301030
var args = (Array.isArray(arguments[0])) ? arguments[0] : arguments;
10311031
return this.replace(/{(\d+)}/g, function (match, number) {
1032-
return (!!args[number]) ? args[number] : match;
1032+
return (typeof args[number] !== "undefined") ? args[number] : match;
10331033
});
10341034
}
10351035

@@ -1043,7 +1043,7 @@ angular
10431043
var args = (Array.isArray(arguments[1])) ? arguments[1] : Array.prototype.slice.call(arguments, 1);
10441044

10451045
return format.replace(/{(\d+)}/g, function (match, number) {
1046-
return (!!args[number]) ? args[number] : match;
1046+
return (typeof args[number] !== "undefined") ? args[number] : match;
10471047
});
10481048
}
10491049

0 commit comments

Comments
 (0)