This documentation is archived and is not being maintained.

type Attribute (errorMessage Element)

Office 2007

Identifies the type of error message to return.

Type

xsd:NMTOKEN

Remarks

The type attribute is an optional attribute of the errorMessage element.

Allowed values are "modeless" and "modal". Default value is "modeless".

A dialog box with the long message is returned for "modal" errors. When the dialog box is closed, the field is marked with a dashed red border to indicate that the value is invalid. A user can read the error message by right-clicking the field.

For "modeless" errors, no dialog box is displayed. The field is marked with a dashed red border to indicate that the value is invalid. A user can read the error message by right-clicking the field.

Bb264966.vs_note(en-us,office.12).gif  Note
If the field is invalid as a result of scripting code or because it was invalid to begin with, but has not been edited, then it will be marked with a red underline.

Example

The following is an example of the type attribute as it is used in 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>


Show: