You can handle validation on the server-side as well and perform any custom logic. If, for some reason, the data submitted does not validate, you can use the JQGrid. afterSubmit method and analyze the response from the server - it will display validation error message on top of the dialog, e.g.
Look for more detail in navGrid afterSubmit code in HTML tab