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
euangreigeuangreig 

Visual Force PageMessages does not display ALL validation failures

I have created a VF page to edit an object which has a lot of validation rules on it. I have a PageMessages control at the top of the page which works in that it shows the first validation error, but it does not show them all. In the UI you see all validation errors at once in a list. Is there a way to make my VF page behave the same way?

 

Thanks in advance


Euan

bob_buzzardbob_buzzard

That does ring a bell.  I seem to recall that in VF, when you attempt a save, the first validation rule failure causes the record to bounce rather than checking all of them.   As far as I can remember, I ended up replicating the validation client side in order to get the behaviour I needed.  Definitely not ideal.