Subject OnValidateField I want field not blanked if wrong
Author mmenaz
I've a code like:
if (AField.FieldName = 'CUSTOMER_CODE') then
begin
if not IsCustCodeOk(AField.AsString) then
raise Exception.Create( 'WRONG customer code' );
end;
When the error raises, the focus is put back to the offending control, but the field is blanked, making hard for the user to check and correct the long, maybe almost 99% correct, code.
How can I have the field value preserved?

Thanks
Marco Menardi