The following functions can be used to find out if any of the standard validation in Forsta Plus has found an error in the respondent's answer(s):
Function | Description |
| QuestionErrors() | returns true if an error has been raised during any validation, false otherwise. |
| MissingRequiredError() | returns true if one or more required answers to a question are missing, false otherwise. |
| ExclusivityError() | returns true if an exclusive answer ("single punch") in a multi has been selected together with any other alternative, false otherwise. |
| NotSpecifiedError() | returns true if an alternative in an Other-Specify construct has been selected/answered without filling in the associated "Specify" text box, false otherwise. |
| NotSelectedError() | returns true if a "Specify" value has been entered in the text box of an Other-Specify construct without selecting/answering the associated alternative, false otherwise. |
| RankError() | returns true if the "Ordered" property has been selected for the form and the answers to the questions are non-numeric, do not start at 1 or are non-consecutive, false otherwise. |
| SizeError() | returns true if one or more open-ended answers exceeded the maximum length specified in field width, false otherwise. |
| NumericError() | returns true if the “Numeric” property has been selected and the answer is not numeric, false otherwise. |
| PrecisionError() | returns true if the “Numeric” property has been selected and the answer cannot be stored within the defined total digits, false otherwise. |
| ScaleError() | returns true if the “Numeric” property has been selected and the answer contains more decimals than in the defined decimal places, false otherwise. |
| RangeError() | returns true if the “Numeric” property has been selected and the answer is outside the defined range, false otherwise. |
| PasswordError() | used on a opentext panel variable with the password property set. Returns true if any of the password validation settings for the panel (in panel settings) have not been satisfied. |
Example:
if(MissingRequiredError())
{
SetQuestionErrorMessage(LangIDs.en,"Please provide an answer.");
}
When one of these functions returns true, an error situation has already been flagged, so you do not have to use the RaiseError function.