ComponentOne True DataControl 8.0
Field Validation

When the user modifies the value of a field in a bound control, validation occurs in the following order:

  1. Data format validation.

  2. WillChangeField event code, if present. This event procedure can change the value entered by the user (for example, convert it to uppercase) and validate it as well.

  3. Required property validation, if specified.

  4. Field-level constraint expressions, if specified.

If one of these fails, True DataControl raises an error. If field validation was triggered by moving focus out of a bound control (the field’s ModificationMode is 2 – Leaving control), True DataControl cancels that focus move, and returns focus to the offending control. In this way, True DataControl effectively prevents the user from leaving a control containing incorrect data. It also gives the user an opportunity to restore the previous value of the field, which permits the user to leave the control. For more information, see Standard error message in field validation.

If the field’s ModificationMode is 1 - Immediate, True DataControl validates each change in the control, even individual keystrokes. In case of an error, the change is automatically canceled.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback