TField.OnValidate is never fired
Original Reporter info from Mantis: David Noriega
-
Reporter name: David Noriega
Original Reporter info from Mantis: David Noriega
- Reporter name: David Noriega
Description:
If you assign code to the OnValidate property to a TField, it still is never called.
Additional information:
Looking at the TField.Validate code (line 886 of fields.inc), even if the OnValidate code is executed, it seems like still it merely passes on the Exception raised in the Onvalidate code if the data isn't valid. For the OnValidate to work as designed in Delphi, it must cancel pending events (except Close form or close application), and keep the focus and editing on the DB Aware component attached to the field.