Iron Speed Designer Help
 

Customizing the Default Error Message

Updated March 9, 2010
Iron Speed Designer V7.0 and later

You can change the data validation error message by setting the ErrorMessage and Text properties of a Validator control.  The ErrorMessage property of a validation control is displayed in a pop-up window while the Text property is displayed at the location of the validator on the web page.  These properties are set at design time, and can be changed via the the Property Sheet for the selected control.

The following example illustrates how to change or replace the default error message text for the Product Name field in the AddProduct.aspx page in a sample application.  The default error message would say, ‘A value for Product Name is required’.

Application Page

If you try to add a new record without a Product Name, you will see your custom error message displayed like this:

Procedure

Step 1:  In the Layout Editor, open the AddProduct.aspx page and select the ProductName control.

Step 2:  In the Property Sheet, add or modify the properties that begin with “ProductNameRequiredFieldValidator:” to specify the properties of the tag’s RequiredFieldValidator.  For a more generic example:

Property

Value

<YourFieldName>RequiredFieldValidator:Enabled

True

<YourFieldName>RequiredFieldValidator:ErrorMessage

A value for Product Name is required to process your order.

Enter a custom error message of your choosing.

<YourFieldName>RequiredFieldValidator:Text

*

(asterisk character)

Step 3:  Build and run the application.