On 9/1/07, davidpersson <[EMAIL PROTECTED]> wrote:
> 1. In which layer should I do the conversion?
> I thought it should be placed within the model in beforeSave() /
> beforeValidate() and afterFind().

You can create a custom validation function that could do all this for
you, even changing the value into the correct format you want before
returning it by manipulating
$this->data['ModelName']['FieldYouAreValidtatingHere']

I believe there is an article in the bakery about advanced validation
that shows you how to build and use one of these things.

Hope that helps.

-- 
Chris Hartjes
Senior Developer
Cake Development Corporation

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to