1.

How Do You Perform Validation On Coach Views?

Answer»

To validate the DATA that is in the COACH before the FLOW proceeds to the next step in the service flow, add a validation node to the flow. The validation node can be a nested service or a server script. The server script is the simpler IMPLEMENTATION although the nested service provides greater flexibility.

Example server script:

tw.local.validate = new tw.object.CoachValidation();

if (tw.local.application.name == “”){
tw.system.addCoachValidationError(tw.local.validate, “tw.local.application.name”,
“The name cannot be empty.”);
}

To validate the data that is in the Coach before the flow proceeds to the next step in the service flow, add a validation node to the flow. The validation node can be a nested service or a server script. The server script is the simpler implementation although the nested service provides greater flexibility.

Example server script:

tw.local.validate = new tw.object.CoachValidation();

if (tw.local.application.name == “”){
tw.system.addCoachValidationError(tw.local.validate, “tw.local.application.name”,
“The name cannot be empty.”);
}



Discussion

No Comment Found