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

Commit

Permalink
Fixed issue #78 - max validator problem
Browse files Browse the repository at this point in the history
'strValue is not defined' error when using `max` auto-detect validator.
  • Loading branch information
ghiscoding committed Nov 4, 2015
1 parent d541aad commit d21b041
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 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.12",
"version": "1.4.13",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": [
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Angular-Validation change logs

1.4.13 (2015-11-04) Fixed issue #76 - 'strValue is not defined' error when using `max` auto-detect validator.
1.4.12 (2015-11-01) Fixed a small issue with pulling the form name when trying to find the parent form of an input element.
1.4.11 (2015-10-29) Enhancement #75 - Added custom rules validation through custom functions. Fixed issue #76 - problem with ui-mask in directive.
1.4.10 (2015-10-12) Sanitized error messages. Fixed issue #69 - Stop when invalid characters typed on input[number].
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.12",
"version": "1.4.13",
"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.12`
`Version: 1.4.13`
### 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 @@ -491,7 +491,7 @@ angular

// When AutoDetect it will auto-detect the type and rewrite the conditions or regex pattern, depending on type found
if (validator.type === "autoDetect") {
validator = validatorAutoDetectType(validator);
validator = validatorAutoDetectType(validator, strValue);
}

// get the ngDisabled attribute if found
Expand Down Expand Up @@ -1270,7 +1270,7 @@ angular
* @param object validator
* @return object rewritten validator
*/
function validatorAutoDetectType(validator) {
function validatorAutoDetectType(validator, strValue) {
if (isNumeric(strValue)) {
return {
condition: validator.conditionNum,
Expand Down

0 comments on commit d21b041

Please sign in to comment.