none
Infopath throws error "only specific pattern allowed" when use regular expression for validation in schema RRS feed

  • Question

  • This is MS info path question, I could not find specific forum for Info-Path So asking my question here

    I am creating Info-Path form from schema. In the schema, the filename has restriction that it can only have extension .pdf or .PDF. But while filling out the form even if I type filename with extension ".pdf", I still see error "only specific pattern allowed".

    Below is my schema I used to create form

    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="Document">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="FileName" type="FileNameType"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>  
      <xs:simpleType name ="FileNameType">
        <xs:restriction base="xs:string">
          <xs:pattern value="^.*\.(pdf|PDF)$"/>
          <xs:minLength value="1" />
          <xs:maxLength value="128" />
        </xs:restriction>
      </xs:simpleType>  
    </xs:schema>


    • Edited by lax4u Tuesday, March 3, 2015 7:35 PM
    Tuesday, March 3, 2015 7:34 PM

Answers

  • Hi

    This is the forum to discuss questions about Microsoft Office development. For your question, I recommend you post the question to the Answers forum for Infopath

    Microsoft Community for​ InfoPath

    By the way, you can get support from here.  Support for Microsoft InfoPath

    Thank you for your understanding.

    Best Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Monday, March 16, 2015 8:45 AM
    Wednesday, March 4, 2015 9:48 AM
    Moderator