XSD as Main Datasource and Required fields (aka, Cannot be blank)

B

Bob C.

Below is a snippit that demonstrats how to create a required/non blank
element in an .xsd document used as the main datasource for your infopath
form:

Comments?

<xsd:element name="foo" type="my:requiredString"/>
<xsd:simpleType name="requiredString">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="requiredAnyURI">
<xsd:restriction base="xsd:anyURI">
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
 
A

Albator

Hi,

Just for information:

when you define an attribut and the type is non-string this attribut
will always be required!

Thierry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top