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="">
      <xs:element name="Document">
            <xs:element name="FileName" type="FileNameType"/>
      <xs:simpleType name ="FileNameType">
        <xs:restriction base="xs:string">
          <xs:pattern value="^.*\.(pdf|PDF)$"/>
          <xs:minLength value="1" />
          <xs:maxLength value="128" />

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


  • 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