match-attributtet (errorCondition-elementet)

Microsoft Office InfoPath

Vis alt Vis alt

match-attributtet (errorCondition-elementet)

Identifiserer XML DOM-nodene (Document Object Model) som den egendefinerte valideringen er deklarert på.

Type

      xsd:string
    

Merknader

match-attributtet er et obligatorisk attributt for errorCondition-elementet.

Eksempel

Eksemplet nedenfor viser bruk av match-attributtet i errorCondition-elementet:

    <xsf:customValidation>
   <xsf:errorCondition
      match="/exp:expenseReport"
      expressionContext="exp:reportDate"
      expression="msxsl:string-compare(., ../exp:startDate) < 0 and ../exp:startDate != """
      showErrorOn=".">
      <xsf:errorMessage
         type="modeless"
         shortMessage="The report date occurs before the end of the expense period.">
         The report date occurs before the end of the expense period. Verify that this is correct.
      </xsf:errorMessage> 
   </xsf:errorCondition>
</xsf:customValidation>