I'm trying to write an OnValidate event on a field on a TClientDataSet, something along the lines of

```
procedure TForm8.ClientDataSet1MyFieldValidate(Sender: TField);
begin
  if Sender.AsFloat > 30 then
     raise Exception.Create('Too Much!!!');
end;

```

But Sender.AsFloat is always 0 - how do I do field level validation (I realize in this instance I could use constraints or set Min/Max values)