i'd say your validation array is incorrect

'website' => array(
   'RULENAME' => array(
      array(
       'required' => false,
       'allowEmpty' => false,
       'rule' => array('url', true),
       'message' => '* Please enter a valid URL.',
       'last' => true),
), ...

whereas RULENAME would here be "validUrl" or just "url" etc

so you missed one "level" in between
no validation at all then


On 2 Jan., 05:50, "Dave" <[email protected]> wrote:
> In my model i have:
>
> 'website' => array(
>    array(
>     'required' => false,
>     'allowEmpty' => false,
>     'rule' => array('url', true),
>     'message' => '* Please enter a valid URL.',
>     'last' => true),
>
>    array(
>     'rule' => array('checkUnique', 'website'),
>     'message' => 'This URL is already registered.',
>     'last' => true)
>    ),
>
> When I enterhttp://www.testits says that's ok. And saves the data.
>
> I have $this->User->save($this->data, true, $white); and $white is my array
> of fields to save
>
> Is there reg expression out there that works better than the cake url
> validation that anyone has come across?
>
> Any ideas?
>
> Thanks
>
> Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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