loopbackjs - Loopback Custom Validation Throws Error -
while using validatable.validate() custom function throwing internal loopback error.
var duplicateconnection = function(err, done, er) { connection.find({where: {userid: this.userid, nucleusid: this.nucleusid}}, function(bug, connection) { if (!_.isempty(connection)) {err();} }); }; connection.validate("userid", duplicateconnection);
error:
if (kind !== false) inst.errors.add(attr, message, code); ^ typeerror: undefined not function @ \node_modules\loopback-datasource-juggler\lib\validations.js:550:37
Comments
Post a Comment