Skip to content

Instantly share code, notes, and snippets.

@raytiley
Created April 22, 2012 21:13
Show Gist options
  • Save raytiley/2466970 to your computer and use it in GitHub Desktop.
Save raytiley/2466970 to your computer and use it in GitHub Desktop.
Design Phase 4 - Report Validator Module
//Anything not exported would be private and not accessible from the loaded module.
var privateVariable = 'I would be hidden';
//Public Method
//Returns JSON object of invalid properties and error descriptions
exports.validateReport = function(report) {
var errors = undefined;
//Return an object of propertyName : errorMessages for all invalid fields
//If object is valid return undefined
return errors;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment