> What's the expected behavior of adding an error with
> @resource.errors.add?  When I attempt it, the record remains in a
> valid state and saves without issue.  Here's an example:

Pretty much the first thing that's done when you call valid? is that
the errors are cleared.  Then the validations are run and the valid?
method returns false if any of the validations fail.  This means that
if you set the errors outside of the validation logic you will loose
this information when you call valid?  The method execute in the
ContextualValidators class is what's called to run through the
validations, so have a look at this if you want to understand what
happens when you run validations.

Rupert

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to