Errors collection class for ActiveRecord. Every ActiveRecord instance has a corresponding ActiveRecord_Errors instance, even if no errors exist for the object.
Located in /activerecord/lib/ActiveRecord/Errors.php (line 17)
Add an error message to the named attribute. Multiple error message may be associated with a single attribute. If no message is provided, the message "is invalid" is used.
Conditionally adds an error message to the list of supplied
attributes when the string length of the attribute values are outside a given range. If no error messages are provided, the messages "is too short (min $lowerBound)" / "is too long (max $upperBound)" are used.
Conditionally adds an error message to the list of supplied attributes when the attribute values are empty (determined by the PHP function empty()). If no error message is provided, the message "is required" is used.
Add an error message that pertains to the base object as opposed to a particular attribute on the object.
Clear all errors from the collection.
Return the collection of all full error messages.
Returns true if the list of errors is empty
Returns true if the named attribute has errors
Return the list of errors associated with the named attribute.
Note, this function always returns an array whether zero, one, or more errors exists.
Returns any errors associated with the base class as opposed to a sepecific attribute.
Return the total number of errors in the collection (same as count(full_messages())).
Documentation generated on Wed, 25 Apr 2012 09:46:42 -0700 by phpDocumentor 1.4.3