String OnValidationTextRequired(int inQuestionIndex, int inValidationID, String inMessage);
Description
This callback is used to allow dynamic text on a validation rule
Parameters
The following is a list of parameters the functions receives
Parameter | Type | Description |
---|---|---|
inQuestionIndex | Int32 | The question Index |
inValidationID | Int32 | The iteration index |
inMessage | string | The Text to pipe |
Return Type
string
Example
Piping the age into Question Index 2 validation rule ID 1
function OnValidationTextRequired(inQuestionIndex, inValidationID, inMessage){
var ans = inMessage;
if (inQuestionIndex == 2 && inValidationID ==1)
{
ans = stringFormat(inMessage,"The Age Entered is: " + Answer(QRef(2)) + " Age needs to be over 18");
}
return ans;
}
Comments
Please sign in to leave a comment.