How to remove required field validation in a Visualforce page?

How to remove required field validation in a Visualforce page?

To remove required field validation in a Visualforce page, set immediate attribute in <apex:commandButton> tag to true.


Example:
<apex:commandButton value=”Cancel” action=”{!cancelChanges}” immediate=”true”/>


here immediate=”true” makes the action to be executed first before executing any validations.

Leave a Reply