开发者

XSD Schema Validation for 6 or 8 length

开发者 https://www.devze.com 2023-03-28 20:21 出处:网络
could anyone please tell me how to specify the validation rule on XSD for scenario below: Order number must be exactly either 6 or 8 char开发者_Go百科ater long

could anyone please tell me how to specify the validation rule on XSD for scenario below:

Order number must be exactly either 6 or 8 char开发者_Go百科ater long


<xsd:simpleType name="orderNumber">
    <xsd:restriction base="xsd:token">
        <xsd:pattern value="[0-9]{6}|[0-9]{8}"/>
    </xsd:restriction>
</xsd:simpleType>
0

精彩评论

暂无评论...
验证码 换一张
取 消