Mark,

I changed the formatting of the validation based on the link you
provided and it seems to be working now. Many thanks!

On Jun 21, 4:47 pm, euromark <dereurom...@googlemail.com> wrote:
> thats not how a valid cake1.3 validation structure should look like
> see the manual:http://book.cakephp.org/view/125/Data-Validation
>
> On 21 Jun., 19:12, Josey <josey.mor...@gmail.com> wrote:
>
> > Absolutely,
>
> > The model validation variable is as follows:
>
> >         var $validate = array(
> >                 'orderid' => 'isUnique'
> >         );
>
> > On Jun 21, 11:19 am, euromark <dereurom...@googlemail.com> wrote:
>
> > > can you post your validation rules here?
>
> > > On 21 Jun., 18:13, Josey <josey.mor...@gmail.com> wrote:
>
> > > > Greetings,
>
> > > > I am attempting to validate data before a save in the controller
>
> > > > $this->data['Order']['orderid'] = 'ecommerceorderid#'
>
> > > > $this->Order->set($this->data);
>
> > > > $this->Order->validates();
>
> > > > ---------
>
> > > > I manually set $this->data['Order']['orderid'] to a value that is
> > > > already present in the database and my model validation rules state
> > > > that 'orderid' is set to 'isUnique'.
>
> > > > When I print $this->Order->validates();, however, the method returns a
> > > > value of '1', which it should not due to the fact that the value is
> > > > already in the database.
>
> > > > Am I missing something?
>
> > > > Basically my application pulls a list of orders from an exterior
> > > > applications API based on a date range. Sometimes some of the items
> > > > within that range may have been pulled at the end of a previous
> > > > request so I want to exclude those from the save array BEFORE the save
> > > > takes place so that all valid entries are logged and invalid ones are
> > > > skipped altogether.
>
> > > > Thanks!

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to