> where do you handle the validation? Only in the controller or in
> both the model and controller?

Fail Early. Fail Often.

Some will say redundancy sucks. I agree, except for where validation is
concerned. If you're writing data from the web into a model, check the
data at the page level, and at the model level.

If you're writing to a model from a command line utility...check data at
the command line level, and the model level...

The trick is to define those check in a way that can be used in both
places....


>=20
> Could you give a short example of taking an actual field from the
> request parameters, validating it, and updating a row with it?
>=20
> Thanks,
>=20
> Maurice
>=20
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]
org/
> Dev site: http://dev.catalyst.perl.org/
>=20
>=20


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to