add more test to remoteForm and simplify error message passing