Forum: Ruby on Rails Validation schemes for model objects that are not yet saved

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Wes G. (Guest)
on 2006-04-17 22:27

I have a model object that I do a bunch of stuff to before I want to
save it to the database.  Actually, to be more specific, I do a lot of
validation that is related to one attribute on this model.  I would like
to do some validation on it but take advantage of something akin to

I've read through this

which referenced this:

and I just wondered if anyone had come up with another scheme for
handling validation for "partially constructed" model objects that they
would be willing to share.

I think I can probably just create another non-database model object to
handle this validation (since the validation is fairly involved), it
seems fair to promote this stuff to first-class object status :).

This topic is locked and can not be replied to.