function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ipsita19861.2880751705180098E1ipsita19861.2880751705180098E1 

adding validation rules

how can i display the errors on my page using validation rules for an object.

can someone help me with this.

Thanx

CLKCLK

Just  add <apex:pagemessages> Component in the VF page. it will automatically shows error message on page whenever Validation rules return true.

Pradeep_NavatarPradeep_Navatar

1. You can validate the record through javascript.

2. In apex You can use ApexPages.Message class and use the <apex:pagemessages> in visual force page.

3. If you are using the standard controller and inputfield component then you can override the salesforce error classes.

CLKCLK

Hi Pradeep,

 

Can u plz explain how can w override error class?