The answer I found was...
no need for allowEmpty or required in notempty rule (that I can see).
Have to do the following to get both models to validate:
$this->Model1->set($this->data)
$this->Model1->Model2->set($this->data) // I would think this line is
all that would be needed, but you need bot
Here are my model rules..
'tin' => array(
//removed because not alll providers will have TIN
'notempty' => array(
'rule' => array('notempty'),
'message' => 'Please provi
I got it working.
Dave
-Original Message-
From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
Sent: October-19-09 2:16 PM
To: cake-php@googlegroups.com
Subject: Validation Help - All code Included
This is driving me crazy.
User Model:
var $validate = array(
'us
Good looking out! Thanks man.
It all looks the same when you stare at it for hours. Fresh eye.
Thanks,
Dave
-Original Message-
From: mikeottinger [mailto:mikeottin...@gmail.com]
Sent: September-15-09 1:32 PM
To: CakePHP
Subject: Re: Validation Help
Hi Dave, you might check your
Hi Dave, you might check your spelling real quick: minLenght should be
minLength. That's probably why your length validation is always
passing.
On Sep 15, 8:30 am, "Dave Maharaj :: WidePixels.com"
wrote:
> I am finally getting around to implementing the validation rules but seem to
> be not quit
I think I figured it out I had my model file named wrong.
yep that was the problem thanks for the help.
On May 7, 8:16 am, matalina wrote:
> arif's sugggestion didn't work either
>
> Dr. Loboto I'm not sure how that will help since the data is saving to
> the database correctly. When I put in
arif's sugggestion didn't work either
Dr. Loboto I'm not sure how that will help since the data is saving to
the database correctly. When I put in an empty field it saves the
empty field instead of outputting an error message. When I put in a
category name it saves it.
Gwoo #2: But the data i
I think it should be:
array(
'rule' => 'alphaNumeric',
'required' => true,
'allowEmpty'=>false
)
);
}
?>
On Thu, May 7, 2009 at 7:57 AM, Dr. Loboto wrote:
>
> Output $this->data in controller and check actual data you try to
> save.
>
> On May 7, 5:35 am, mata
Output $this->data in controller and check actual data you try to
save.
On May 7, 5:35 am, matalina wrote:
> I have tried various combinations for validation still nothing is
> working.
>
> This is my last attempt and it's still not validating an empty field,
> I still get an empty database valu
Are you sure that cake is finding your model? pr($this->Category);
inside your controller. If you see an AppModel instance rather than a
Category instance then you know cake is unable to find the model.
Also, make sure that the form input is correctly sending the fields
you are expecting. If you
I have tried various combinations for validation still nothing is
working.
This is my last attempt and it's still not validating an empty field,
I still get an empty database value (new id no content - instead of an
error message)
array(
'rule' => 'alphaNumeric',
'required' => t
11 matches
Mail list logo