Hello everyone,
I need to define a pattern for a field in XSD where it is a string datatype. The total length is 11. It must allow any data which starts with “S” or “s” followed by 10 digits. S and s are optional.
If they are not sending S or s infront of the number. It must allow the number. Here is what I got but I dont know whether its true or not. Can someone help.
<xs:element name=“Sample”>
xs:simpleType
<xs:restriction base=“xs:string”>
<xs:pattern value=“[1]?(\d{10})+$”/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Regards,
David.
-
Ss ↩︎