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

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -