<xs:element name="CurrencyCode" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="3" />
</xs:restriction>
</xs:simpleType>
</xs:element>
Run Code Online (Sandbox Code Playgroud)
但如果我的值为空,则返回错误
cvc-length-valid:对于类型为'#AnonType_CurrencyCodeServiceServiceList'的长度为'3',值''with length ='0'不是facet-valid.
那我怎么处理呢?
xsd ×1