Reputation: 47
I'm using Delphi 7. I use the component tCxDateEdit, in ValidationOptions , I put the evoRaiseException a false the evoshowErrorIcon a true When I inser a wrong date like "31/02/2015" , an Icon appear next to my date component and I have a message error like "Date incorrecte" there are a way to change the Error message?
thanks in advance.
Upvotes: 1
Views: 527
Reputation: 30735
You can modify the displayed text in the control's OnValidate event like this
procedure TForm1.cxDBDateEdit1PropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
begin
ErrorText := DisplayValue + ' is not a valid date';
end;
Upvotes: 4