If you are using the validator class from CheeseCake or others ( I assume
here - not sure if it Tariq's or someone else's and he is simply using it. )
the correct method is to use

echo $validator->tagErrorMsg( 'Project/start_date' );

I am NOT sure if this is the codebase you are working with but it sounds
likely. Also, note the lack of message in the function call. In the
validator class I am familiar with ( see above ) the messages depend on the
error and are found through the validation array in the model.

Abba Bryant


vidya-6 wrote:
> 
> 
> Hai,
> 
> I have one problem with custom validation. In my model class validater
> function is
> 
> function validates()
> {
>      // Validation code goes here
>    if($error)
>       return false;
> 
>  }
> 
> Validation worked for me, but i can't display the error message on the
> view using tagErrorMsg.
> ie;
> echo $html->tagErrorMsg('Project/start_date', 'please enter a valid
> date')  ;
> 
> Can any one solve this problem?
> 
> Thanks,
> Vidya.
> 
> 
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-custom-validation-tf3252461.html#a9086606
Sent from the CakePHP mailing list archive at Nabble.com.


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