How to display Error Messages in the Salesforce Visualforce Page?
To display error messages in the Visualforce page add below tag where you want to display the error message. Visualforce page: <apex:pageMessages /> Apex Controller: ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error ....