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

Commit

Permalink
Fixed issue #65 - invalid return on String.format()
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Sep 9, 2015
1 parent 9d22084 commit c72a2f0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-ghiscoding",
"version": "1.4.6",
"version": "1.4.7",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": [
Expand Down
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Angular-Validation change logs

1.4.6 (2015-09-04) Accepted pull #64 - Update `es.json` translation file.
1.4.7 (2015-09-08) Fixed issue #65 - invalid return value on function String.format()
1.4.6 (2015-09-04) Accepted pull #64 - Update Spanish `es.json` translation file.
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.
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.
1.4.3 (2015-08-18) Fixed issue #58 - multiple ControllerAs with Route change giving error of 'undefined' on $validationSummary.
Expand Down
6 changes: 3 additions & 3 deletions dist/angular-validation.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-ghiscoding",
"version": "1.4.6",
"version": "1.4.7",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": "app.js",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Angular Validation (Directive / Service)
`Version: 1.4.6`
`Version: 1.4.7`
### Form validation after user inactivity of default 1sec. (customizable timeout)

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!
Expand Down
4 changes: 2 additions & 2 deletions src/validation-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ angular
function stringPrototypeFormat() {
var args = (Array.isArray(arguments[0])) ? arguments[0] : arguments;
return this.replace(/{(\d+)}/g, function (match, number) {
return (!!args[number]) ? args[number] : match;
return (typeof args[number] !== "undefined") ? args[number] : match;
});
}

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

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

Expand Down

0 comments on commit c72a2f0

Please sign in to comment.