Required fields do not allow cancel

Using above solution i.e. "apex:form html-novalidate" will disable all validations for all command buttons including buttons like "Save". It would be best to disable validations only on press of CANCEL button, which could be achieved in an isolated way on CANCEL button only i.e.

<apex:commandButton action="{!cancel}" value="Cancel" immediate="true"
                    html-formnovalidate="formnovalidate" />

This only disables validation on CANCEL button press and they work on rest of the buttons. Read more about it in my recent blog post for the same : http://www.tgerm.com/2014/06/cancel-out-of-html5-browser-based-validations-novalidate.html


If you are setting your doctype to HTML5 and having a validation error on cancel, I would recommend that you pass through the html "novalidate" parameter (assuming in normal save, all of your validation would be done via Apex and not the HTML 5 validation. Should work like this:

<apex:form html-novalidate>