I currently have this in an XSD:
<xs:element name="qty" maxOccurs="1" minOccurs="1" />
How can I add a rule that also only allows the value of Qty to be between 100 to 2000?
Use xs:restriction with xs:{min|max}{In|Ex}clusive:
<xs:simpleType name="Quantity100to2000">
<xs:restriction base="xs:integer">
<xs:minExclusive value="100"/>
<xs:maxExclusive value="2000"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="qty" maxOccurs="1" minOccurs="1" type="Quantity100to2000"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With