ActiveRecord_ErrorsErrors 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)
void
add_on_boundary_breaking
(mixed $attr, int $lowerBound, int $upperBound, [string $msgShort = false], [string $msgLong = false])
add (line 56)
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.
add_on_boundary_breaking (line 95)
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.
add_on_empty (line 71)
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_to_base (line 44)
Add an error message that pertains to the base object as opposed to a particular attribute on the object.
clear (line 173)
Clear all errors from the collection.
full_messages (line 148)
Return the collection of all full error messages.
is_empty (line 166)
Returns true if the list of errors is empty
is_invalid (line 116)
Returns true if the named attribute has errors
on (line 129)
Return the list of errors associated with the named attribute.
Note, this function always returns an array whether zero, one, or more errors exists.
on_base (line 139)
Returns any errors associated with the base class as opposed to a sepecific attribute.
size (line 182)
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