XSD Pattern Exceeds Maximum -1 Characters

Tag: xsd Author: hugl2010 Date: 2013-06-30

when i am using pattern with xsd i am getting "Column Exceeds Maximum -1 Characters" error

<xs:element name="OfficeEmail" 
            type="ValidateEmail"  
            minOccurs ="0"/>

<xs:simpleType name="ValidateEmail">
  <xs:restriction base ="StringMaxLen200">
    <xs:pattern value="[a-zA-Z][a-zA-Z][a-zA-Z]"/>
  </xs:restriction>
</xs:simpleType>

Any thoughts on how could i solve this error.

Thanks in advance.

When do you get this error?
Hi Jirka, Thanks ! I am getting maximum length error, error message is customised by me. In short i can say its not matching maximum length somehow when i am using pattern any thoughts??

Other Answer1

You're much more likely to get good responses to questions on Stack Overflow if you provide enough information to enable others to reproduce the problem. (This is of course difficult if you have no idea where to start). There is good advice on asking effective questions in the SO help files and in Eric Raymond and Rick Moen's essay How to ask questions the smart way.

Concretely: show the declaration for type StringMaxLen200; identify the software (and version) producing the error message; show input that elicits the error. From the information you give, the only diagnosis possible is "you are doing something wrong" and the only advice that makes sense is "stop doing that thing".