WinStudio

Understanding Validators

WinStudio provides an extensive facility for validating values in components. WinStudio validators are global objects that can be reused across multiple components and forms. You can associate one or more validators with a component.

WinStudio validators support a set of behaviors that allow for very efficient processing of the component. For instance, you can set up a validator that is related to the component list source in such a way that any value matching an item in the list is automatically considered valid. In many cases, this technique will eliminate round trips to the server. Moreover, you can set up validators that validate a value and also return output values to the form for functions like displaying associated descriptions or setting down-stream component defaults. This technique also eliminates round trips to the server.

Validate Immediately

Validators can be executed when a user selects from a list or exits the component, or they can be deferred until the user attempts to navigate to a different IDO item in the collection or to save the form. To make a component's validators execute when the user selects from a list or exits the component, set the Validate Immediately property.

Validator Messages

You must specify an error message for all validators. You can specify an existing WinStudio string or create your own message string for the error message (see Message Strings).

Validator Dependencies

Previously validated data may become invalidated because some value on which the validation is dependent changes. A validator's specification may reference a component, a variable, or a property value. If this value changes subsequent to validating the component, the component is marked as not validated. In this event, the validator would execute again if the user tabbed through the component or saved the form.


Related Topics

About Validating Components

Create, Copy, Edit, or Delete Validators

Maximum Length of Parameters and Values

Tip: Choosing Efficient Validators

Tip: Reducing Round Trips to the Server

Tip: Using List Sources and Validators

Validator Types

Message Strings