You need to sign in to do that
Don't have an account?
hikiran raju
how to show the validation error message in custom VF page
Hi everyone,
I have created an custom VF page with std.object and Custom object fields. In that i have an submit button, when submit button is clicked i need to show the error messages for the fields which are mandatory if they are empty and null. How can i show the validation error message in my custom vf page. Can any one help me over here.
Thanks in advance.
Regards,
kiran.
I have created an custom VF page with std.object and Custom object fields. In that i have an submit button, when submit button is clicked i need to show the error messages for the fields which are mandatory if they are empty and null. How can i show the validation error message in my custom vf page. Can any one help me over here.
Thanks in advance.
Regards,
kiran.
1) http://www.sfdcpoint.com/salesforce/show-error-message-visualforce-page/
2) http://www.infallibletechie.com/2013/04/how-to-add-error-message-in-visualforce.html
3) http://www.infallibletechie.com/2012/10/how-to-display-error-messages-in.html
Visualforce page:
<apex:pageMessages />
Apex Controller:
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error Message.');
ApexPages.addMessage(myMsg);
(Or)
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Error Message.'));