diff --git a/lib/table.js b/lib/table.js index fb2b4e6..137847f 100644 --- a/lib/table.js +++ b/lib/table.js @@ -288,6 +288,12 @@ Table.prototype.update = function (item, options, callback) { return callback(err); } + var result = self.schema.validate(data); + + if(result.error) { + return callback(result.error); + } + var hashKey = data[self.schema.hashKey]; var rangeKey = data[self.schema.rangeKey] || null;