On Feb 20, 7:33 am, "regi" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am new to Cakephp. Ihave a problem with date validation.End date
> should always be greater than Start date. I have done the validation
> in my model ie;
>
> 'end_date' => array(VALID_NOT_EMPTY,'rule' =>array('comparison', '>',
> 'start_date') )
>
> But when I submit the form, I get the validation error,  even if I
> enter the end date which is greater than start date.
>
> also  a warning
>
> Warning: preg_match() expects parameter 1 to be string, array given
> in /home/localhost/public_html/myproject/cake/libs/model/
> model_php5.php on line 1348.
>
> Can anyone help me  to solve this problem.

Unless you have overwritten something in yoru model, validations are
purely regex based and what you have above isn't a regex. There are
articles on the bakery that are probably of interest to read.

HTH,

AD


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