Validators - Example 2

string errorMsg = "You must enter a comment!"; if(!hasInput("comment")) { return false, "comment", errorMsg; }

Because the second parameter (optional) was used in this example the error message will also display beneath the comment field.

When using transition screens be sure to use routines that can read screen values like hasInput() or getInput() otherwise the script will retrieve the value (if any) stored in the issues and not the value the user just input into the field and is trying to save.

 

Peacock