Comparing version 1.1.1 to 1.2.0
1.2.0 / 2015-09-21 | ||
================== | ||
* feat: remove field name from error message. #12 | ||
1.1.1 / 2015-09-15 | ||
@@ -36,3 +41,3 @@ ================== | ||
0.0.7 / 2013-08-09 | ||
0.0.7 / 2013-08-09 | ||
================== | ||
@@ -42,3 +47,3 @@ | ||
0.0.6 / 2013-08-07 | ||
0.0.6 / 2013-08-07 | ||
================== | ||
@@ -49,3 +54,3 @@ | ||
0.0.5 / 2013-08-06 | ||
0.0.5 / 2013-08-06 | ||
================== | ||
@@ -55,3 +60,3 @@ | ||
0.0.4 / 2013-07-01 | ||
0.0.4 / 2013-07-01 | ||
================== | ||
@@ -61,3 +66,3 @@ | ||
0.0.3 / 2013-06-26 | ||
0.0.3 / 2013-06-26 | ||
================== | ||
@@ -68,3 +73,3 @@ | ||
0.0.2 / 2013-06-26 | ||
0.0.2 / 2013-06-26 | ||
================== | ||
@@ -74,3 +79,3 @@ | ||
0.0.1 / 2013-06-26 | ||
0.0.1 / 2013-06-26 | ||
================== | ||
@@ -77,0 +82,0 @@ |
@@ -87,3 +87,3 @@ /** | ||
errors.push({ | ||
message: t('%s required', key), | ||
message: t('required'), | ||
field: key, | ||
@@ -105,3 +105,3 @@ code: t('missing_field') | ||
errors.push({ | ||
message: t('%s ' + msg, key), | ||
message: msg, | ||
code: t('invalid'), | ||
@@ -115,3 +115,2 @@ field: key | ||
var dot = rule.type === 'object' ? '.' : ''; | ||
e.message = t('%s%s' + e.message, key, dot); | ||
e.field = key + dot + e.field; | ||
@@ -472,3 +471,3 @@ errors.push(e); | ||
field: index, | ||
message: index + ' ' + errs, | ||
message: errs, | ||
code: t('invalid') | ||
@@ -480,3 +479,3 @@ }); | ||
e.field = index + '.' + e.field; | ||
e.message = index + '.' + e.message; | ||
e.message = e.message; | ||
return e; | ||
@@ -483,0 +482,0 @@ })); |
{ | ||
"name": "parameter", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "A parameter verify tools.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -185,3 +185,3 @@ parameter | ||
field: 'name', | ||
message: 'name required' | ||
message: 'required' | ||
} | ||
@@ -196,3 +196,3 @@ ``` | ||
field: 'age', | ||
message: 'age should be an integer' | ||
message: 'should be an integer' | ||
} | ||
@@ -199,0 +199,0 @@ ``` |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18869
427
1