Here is the xml file which I want to validate against below XML schema.
<?xml version="1.0" encoding="UTF-8"?>
<Students>
<Name></Name>
<Phone>0123987654</Phone>
<Address>
In front of PNB
</Address>
<Dob>2002-09-24</Dob>
</Students>
XML Schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Students">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" nillable="false" />
<xs:element name="Phone" type="xs:integer"/>
<xs:element name="Address" type="xs:string"/>
<xs:element name="Dob" type="xs:date" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
During validation, I didn't notice any error though Name Field was empty and nillable="false" was set in schema. The name field shouldn't be empty and if no value is provided in error then validation error should have been thrown. Can anybody suggest solution how same can be implemented through MinLength as for simpletype it is possible for me but complex type not sure how to proceed further.