btSalir es el boton qe usas para la salida, lo escribi de memoria pero deberia funcionar
Código Delphi
[-]procedure TFprincipal.ECuentaExit(Sender: TObject);
begin
If ((Length((Sender As TEdit).Text) < 10) OR ((Sender As TEdit).Text='')) and not (ActiveControl is btSalir) Then
(Sender As TEdit).SetFocus;
end;