Ben Maynard Thu Jul 22 17:10:19 -0400 2010

Subject: Looping through validation errors

First off just have to say i'm loving active record so keep up the good work, looking forward to the caching features. I started working on a cache extension for active record and I got the system to cache results from find() and getting columns and then i checked out the trunk and noticed you have already started work on it so I ditched my effort! If you do need any help implementing that feature, I would be happy to give a hand.

Now onto my problem, when I save the record and I get back a list of errors, I am wondering if it is possible to grab (or loop) the first error and return just the message. when I loop through errors and echo the error I get the field name and then the message in the same string. Essentially what I want to do is if there is an error, I want the throw an exception with the first error message.


Kien La Fri Jul 23 13:37:51 -0400 2010
Ash McKenzie Mon Nov 29 17:15:41 -0500 2010