On Jun 12, 3:52 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 6/12/07, R.RajeshJebaAnbiah<[EMAIL PROTECTED]> wrote:
> >    I suppose the correct approach is to have error messages in model
> > and then override it in form::input() whenever necessary.
>
> Hmmm.... the classic "negative number in red" case
>
> The argument against messages in model is that the messages are parts
> of display logic What you say is convenient for all purposes...

Benefits:
1. You don't have to switch to model and view to define the rule and
messages. (More readability and manageability)
2. You don't have to rewrite the same messages whenever you reuse the
model (reusability)

Incidentally, however, I find that having model-based validation is a
kind of problem for sometime. I'll add a new thread sometime later to
see if I can get any good suggestions.

--
  <?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: http://rajeshanbiah.blogspot.com/


--~--~---------~--~----~------------~-------~--~----~
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