By registering a listener to the beforesubmit event, you can validate a dialog.

... xtype="dialog">    ... 

Serverside Validation

After defining a custom validating servlet, you can put the following code snippet in the beforesubmit area. It is important to call the servlet using async=false, to ensure everything is handled by the same thread.

CQ.Ext.Ajax.request({ method: 'POST', url: '/content.myvalidationservlet.json', async: false, success: function(response){
  // do something 
}, params: { ... } });