code: function registerError(inputName, error) {
  
              if (!errors[inputName]) {
                  errors[inputName] = [];
              }
  
              error = error.capitalize();
  
              var hasError = false;
              for (var i = 0; i < errors[inputName].length; i++) {
                  if (errors[inputName][i] === error) {
                      hasError = true;
                      break;
                  }
              }
  
              if (!hasError) {
                  errors[inputName].push(error);
              }
  
          }
docs: Register an error into the global "error" variable.
  
  @param {String} inputName Input where the error occurred
  @param {String} error Description of the error to be displayed