lib/card.js
function (params, cb) {
                  // validate input requirements vs what came back in params
                  var errorMessage = null;

                  _.forEach(Card.inputs, function (input, key) {
                    if (input.required && !params[key]) {
                      if (!errorMessage) {
                        errorMessage = '';
                      }
                      else {
                        errorMessage += ' | ';
                      }

                      errorMessage += 'No value provided for required input: ' + key;
                    }
                  });

                  cb(errorMessage, params);
                }
function (params, cb) {
                  // validate input requirements vs what came back in params
                  var errorMessage = null;

                  _.forEach(Card.inputs, function (input, key) {
                    if (input.required && !params[key]) {
                      if (!errorMessage) {
                        errorMessage = '';
                      }
                      else {
                        errorMessage += ' | ';
                      }

                      errorMessage += 'No value provided for required input: ' + key;
                    }
                  });

                  cb(errorMessage, params);
                }
function ( params , cb ) { // validate input requirements vs what came back in params var errorMessage = null ; _ . forEach ( Card . inputs , function ( input , key ) { if ( input . required && ! params [ key ] ) { if ( ! errorMessage ) { errorMessage = '' ; } else { errorMessage += ' | ' ; } errorMessage += 'No value provided for required input: ' + key ; } } ) ; cb ( errorMessage , params ) ; }
check for input validation errors
check for input validation errors