Skip to content

Commit

Permalink
Merge pull request #6 from nettofarah/force-strings
Browse files Browse the repository at this point in the history
Force validator.js helpers to use strings
  • Loading branch information
nettofarah committed Feb 18, 2016
2 parents 6fb3d49 + 7d8a35f commit 8a8d0a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 0.3.1(Feb 18, 2016)
- Coerce input to string when using validator.js helpers

### 0.3.0(Feb 13, 2016)
- Optional validations support

Expand Down
2 changes: 1 addition & 1 deletion lib/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function checkParam(paramName, message, validator) {
return {
field: paramName,
message: "\""+ paramName +"\" " + message,
result: validator.apply(null, [param].concat(extraArgs))
result: validator.apply(null, [param + ""].concat(extraArgs))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "property-validator",
"version": "0.3.0",
"version": "0.3.1",
"description": "Easy property validation for JavaScript, Node and Express.",
"main": "index.js",
"homepage": "http://github.com/nettofarah/property-validator",
Expand Down

0 comments on commit 8a8d0a9

Please sign in to comment.