Check out my comment on the bakery:
(yes it's got code)

http://bakery.cakephp.org/articles/view/multiple-rules-of-validation-per-field-in-cakephp-1-2#1943

Should help you do what you need

On Feb 22, 4:20 pm, su6z3r0 <[EMAIL PROTECTED]> wrote:
> Hello,
>
> is there a way to ouput different error message depending on the
> result of the custom validation method?
>
> I am checking a field with a custom valdation method and depeding on
> the data entered there should be different messages. I.e. in the below
> code "message" => "Error" should be replaced by a variable set in the
> custom validation method. Actually I would like to return the error
> codes from the $_FILES array.
>
> 'validateFile' => array(
>                 'rule' => array('validateFile'),
>                 'required' => true,
>                 'message' => 'Error'
>           )
>
> Is there a way to do that?
--~--~---------~--~----~------------~-------~--~----~
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