Tag format:
Start validation block... v:Section:ValidationType:parameters
End validation block... /v:Section:ValidationType:closing parametersAll validation blocks must be closed. Section is the name of the section that is being validated, this acts as a label in case the validation fails, it can inform the user which section the error occured at. Also, if there exists an anchor by that same name, the web browser will attempt to jump to that anchor.
Validation Type can be one of the following values:
parameters: "Failure Message" - a message that
should be displayed if validation fails
closing parameters: None
<input name="valtag1" value="v:Section 1:NoBlanks:Question left unanswered" type=hidden> <input name="q1" value="1" type="radio"> <input name="q1" value="2" type="radio"> <input name="q1" value="3" type="radio"> <input name="q2" type="text"> <input name="q3" type="textarea"> <input name="endvaltag1" value="/v:Section 1:NoBlanks:" type=hidden>
If the parsing fails, then the value will be left out of the sum (see Parsable to ensure that text fields contain valid numbers.) Check boxes that have been set to true will add 1 to the sum. This can be useful for ensuring that a group of check boxes has the correct number of checks (ie... 1 or more, less than 3, exactly 5)
parameters: "Failure Message:evaluation expression"
Failure Message - message to display when validation fails.
evaluation expression - "evaluation expression"
- boolean expression to evaluate, where true means that the validation
block has passed. The keyword "sum" represents the sum of the fields in
the validation block. (see examples)
closing parameters: None
<input name="valtag2" value="v:Section 2:CheckSum:Must be between 50 and 100:(sum<=100) && (sum >=50)" type=hidden> <input name="q4" type="text"> <input name="q5" type="text"> <input name="endvaltag2" value="/v:Section 2:CheckSum" type=hidden>
<input name="valtag3" value="v:Section 2:CheckSum:Must check at least 1:sum >= 1" type=hidden> <input name="q6" type="check"> <input name="q7" type="check"> <input name="endvaltag3" value="/v:Section 2:CheckSum:">NoValidation - Overrides all validation checks. If a section is contained within this tag, no validation will be attempted.
parameters: None
closing parameters: None
<input name="valtag1" value="v:Section 1:RadioTouched:Question left unanswered" type=hidden> <input name="q1" value="1" type="radio"> <input name="q1" value="2" type="radio"> <input name="q1" value="3" type="radio">
<input name="novaltag1" value="v:Section 1:NoValidation:"> <input name="q2" type="text"> <input name="endnovaltag1" value="/v:Section 1:NoValidation:">
<input name="q3" type="textarea"> <input name="endvaltag1" value="/v:Section 1:RadioTouched:" type=hidden>Parsable - Ensure that all fields within the validation block contain parsable values.
parameters: "Failure Message" - Message to display
when validation fails.
closing parameters: None
<input name="parsable1" value="v:Section 2:Parsable:Must contain a number" type="hidden">
<input name="valtag2" value="v:Section 2:CheckSum:Must be between 50 and 100" type=hidden> <input name="q4" type="text"> <input name="q5" type="text"> <input name="endvaltag2" value="/v:Section 2:CheckSum:(sum<=100) && (sum >=50)" type=hidden>
<input name="valtag3" value="v:Section 2:CheckSum:Must check at least 1" type=hidden> <input name="q6" type="check"> <input name="q7" type="check"> <input name="endvaltag3" value="/v:Section 2:CheckSum:sum >= 1">
<input name="endparsable1" value="/v:Section 2:Parsable:" type="hidden">