Share via


errorMessage Element

Specifies the error message that should be returned if the value of the specified XML Document Object Model (DOM) node is considered to be invalid.

Type

  xsf:xdErrorMessage

Structure

Name Description
shortMessage (Required attribute) Identifies the short error message to return in case of invalid data.
type (Optional attribute) Identifies the type of error message to return.

Remarks

The errorMessage element is a required element of the errorCondition, override, and submit elements.

You can supply a detailed error message as the value of the errorMessage element. The detailed error message is displayed by clicking the shortcut menu's Full error description button when error information is displayed and when the error message type attribute is set to "modal". Maximum length of the error message is 1023 characters.

Example

The following is an example of the errorMessage element:

  <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>