Code: Select all
function runValidations(request, response)
{
var validator = require(validators.js");
if (!validator.customerIsValid(request)) {
//set failure variable
} else {
//set success variable
}
}
Code: Select all
function customerIsValid(request)
{
// reusable routine to do the actual validation
}
export default customerIsValid;
Code: Select all
{
"error": {
"code": "MODULE_NOT_FOUND",
"requireStack": [
"c:\\Projects\\TestProjects\\ProfoundJS\\modules\\valTests\\...
],
"message": "Cannot find module 'validators.js' Require stack: -