lib/impl/importForms/inputValidator.js
function validateForm(form, cb) {

  async.series([function(callback) {
    fs.exists(form, function(exists) {
      if (exists) {
        callback(null);
      } else {
        callback('File ' + path.basename(form) + ' referenced by metadata.json does not exists');
      }
    });
  },
    function(callback) {
      validateJSonStructure(form, callback);
    }
  ], function(err, data) {
    cb(err, data);
  });
}
function validateForm(form, cb) {

  async.series([function(callback) {
    fs.exists(form, function(exists) {
      if (exists) {
        callback(null);
      } else {
        callback('File ' + path.basename(form) + ' referenced by metadata.json does not exists');
      }
    });
  },
    function(callback) {
      validateJSonStructure(form, callback);
    }
  ], function(err, data) {
    cb(err, data);
  });
}
function validateForm ( form , cb ) { async . series ( [ function ( callback ) { fs . exists ( form , function ( exists ) { if ( exists ) { callback ( null ) ; } else { callback ( 'File ' + path . basename ( form ) + ' referenced by metadata.json does not exists' ) ; } } ) ; } , function ( callback ) { validateJSonStructure ( form , callback ) ; } ] , function ( err , data ) { cb ( err , data ) ; } ) ; }
Validate the received form file.

@param {string} form path to the form file to be validated
@param {function} cb callback
Validate the received form file .