Have you tried Model::invalidate(...)?

http://api.cakephp.org/1.2/class_model.html#81c94997c2d6158c40efd9c7008f18a3

On Mar 6, 10:29 pm, Mike <[EMAIL PROTECTED]> wrote:
> Hello!
>
> In CakePHP 1.2, one can define a validation rule (in a model) that
> calls a method to do the validation.  If the method returns false,
> then whatever message was specified for that rule is displayed in the
> view, which is great for most of data validation needs.
>
> However, in the case that the method returns false, I'd to have that
> method change the 'message' to be something new (which the method just
> generated).  It looks like I can do this by hacking the cake/  file,
> and by tweaking some code in the invalidFields method (right around
> the calls to call_user_func_array).
>
> Is it possible to do this (to have the validation method set/change
> the message dynamically) without hacking Cake itself?  I'm really
> sorry if I've missed this, but I've looked around, but haven't found
> anything that seems directly applicable.
>
> Thanks!
> ---Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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