[Catalyst] Form validation in insert() and update()?

Dave Rolsky autarch at urth.org
Tue May 15 02:42:53 GMT 2007


On Mon, 14 May 2007, Bill Moseley wrote:

>> There are two kinds of validation here. One is model-level validation, and
>> yes, it's in my model code. My model throws exceptions, which I trap in
>> the controller and "mess with" to make it work for the web UI.
>
> I tend to have much less validation in the "model" (if that's the ORM
> layer to the database) and instead use the database to enforce the model
> constraints, where possible.

The database is also part of the model. I wasn't suggesting that 
validation has to happen in Model class code versus the database.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/



More information about the Catalyst mailing list