OnValidationTextRequired()

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;
}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.