This code put in an Action button will try and save the current document, and if the Input Validation fails will display the Input Validation message, otherwise it will compose the document.
r:=@Command([FileSave]);
@If(r=0;
@Return("");
@PostedCommand([Compose];"NextForm"))