module.exports = function(Self) { /* Self.validateAsync('observationTypeFk', validateObservationUniqueness, { message: `The observation type can't be repeated` }); async function validateObservationUniqueness(err, done) { let observationExists = await Self.findOne({ where: { ticketFk: this.ticketFk, observationTypeFk: this.observationTypeFk } }); if (observationExists) err(); done(); } */ };