function validateCollectors(seq, collectorNames) {
  return new seq.Promise((resolve, reject) =>
    validateCollectorNames(collectorNames)
    .then(() => checkCollectorsExist(seq, collectorNames))
    .then(resolve)
    .catch(reject)
  );
}
/**
 * Used by db model.
 * Validate the collectors field: if succeed, return a promise with
 * the collectors.
 * If fail, reject Promise with the appropriate error
 *
 * @param {Object} seq the Sequelize object
 * @param {Array} collectorNames Array of strings
 * @returns {Promise} with collectors if validation and check pass,
 * rejected promise with the appropriate error otherwise.
 */
Used by db model.
Validate the collectors field: if succeed, return a promise with
the collectors.
If fail, reject Promise with the appropriate error

@param {Object} seq the Sequelize object
@param {Array} collectorNames Array of strings
@returns {Promise} with collectors if validation and check pass,
rejected promise with the appropriate error otherwise.
Used by db model . Validate the collectors field : if succeed return a promise with the collectors . If fail reject Promise with the appropriate error @param { Object } seq the Sequelize object @param { Array } collectorNames Array of strings @returns { Promise } with collectors if validation and check pass rejected promise with the appropriate error otherwise .
function validateCollectors(seq, collectorNames) {
  return new seq.Promise((resolve, reject) =>
    validateCollectorNames(collectorNames)
    .then(() => checkCollectorsExist(seq, collectorNames))
    .then(resolve)
    .catch(reject)
  );
}
function validateCollectors ( seq , collectorNames ) { return new seq . Promise ( ( resolve , reject ) => validateCollectorNames ( collectorNames ) . then ( ( ) => checkCollectorsExist ( seq , collectorNames ) ) . then ( resolve ) . catch ( reject ) ) ; }
Used by db model.
Used by db model .