Mobile SDK > Disconnected mobile application reference > SurveyQuestionXMLMDSC reference > SurveyQuestionXMLMDSC examples > Long validation example
 
Long validation example
This example provides a long question that uses a range, and shows how the range is specified for validation. The example allows whole numbers between 1 and 10 (inclusive), except for whole numbers between 5 and 7 (inclusive) (for example, 1, 2, 3, 4, 8, 9, 10).
Metadata script
Grade long [1..10, ^5..7];
Rendered
XML
<Question QuestionFullName="Grade" QuestionDataType="Long">
  <Label><Text>"Grade"</Text></Label>
  <Validation MinValue="1" MaxValue="10" RangeExpression="1..10, ^5..7"></Validation>
</Question>
See also
SurveyQuestionXMLMDSC examples