Skip to content

Commit

Permalink
Revert "[api] Allow "conform" function to access other object values, F…
Browse files Browse the repository at this point in the history
…ix #22"

This reverts commit c963b26.
  • Loading branch information
Southern committed Oct 16, 2012
1 parent c963b26 commit d703132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/revalidator.js
Expand Up @@ -224,7 +224,7 @@
type;

function constrain(name, value, assert) {
if (schema[name] !== undefined && !assert(value, schema[name]), object) {
if (schema[name] !== undefined && !assert(value, schema[name])) {
error(name, property, value, schema, errors);
}
}
Expand Down Expand Up @@ -279,7 +279,7 @@
checkType(value, schema.type, function(err, type) {
if (err) return error('type', property, typeof value, schema, errors);

constrain('conform', value, function (a, e, object) { return e(a, object) });
constrain('conform', value, function (a, e) { return e(a) });

switch (type || (isArray(value) ? 'array' : typeof value)) {
case 'string':
Expand Down

0 comments on commit d703132

Please sign in to comment.