Bei der Gruppe, für die Sie eine Mitteilung verfassen, handelt es sich um eine Usenet-Gruppe. Wenn Sie in dieser Gruppe Nachrichten posten, ist Ihre E-Mail-Adresse für jeden im Internet sichtbar
I have this weird problem. I set up validation rules but cake seems to ignore them. Here is my model and controller: http://bin.cakephp.org/view/309506151
which obviously sould not validate, yet the first debug returns 'true'. This is driving me crazy, my controller is kind of 'nasty', because I was trying to debug the problem.
> I have this weird problem. I set up validation rules but cake seems to > ignore them. Here is my model and controller:http://bin.cakephp.org/view/309506151
> which obviously sould not validate, yet the first debug returns > 'true'. This is driving me crazy, my controller is kind of 'nasty', > because I was trying to debug the problem.
Nope. I tried this with other rules: minLength, maxLength and it always validates. It seems like the rules are simply ignored. It occours only in this one specific model. Don't know what's behind this...
On 9 Lut, 15:49, Céryl <c.a.h.wilt...@student.tue.nl> wrote:
> Not sure but is there a chance that the username is an empty string > like "" or has a stray space perhaps? And therefore not considered > empty?
> If not... Beats me! :D
> On 8 feb, 17:31, Tomek Mazur <tmazu...@gmail.com> wrote:
> > Hi,
> > I have this weird problem. I set up validation rules but cake seems to > > ignore them. Here is my model and controller:http://bin.cakephp.org/view/309506151
> > which obviously sould not validate, yet the first debug returns > > 'true'. This is driving me crazy, my controller is kind of 'nasty', > > because I was trying to debug the problem.
> Nope. I tried this with other rules: minLength, maxLength and it > always validates. It seems like the rules are simply ignored. It > occours only in this one specific model. Don't know what's behind > this...
> On 9 Lut, 15:49, Céryl <c.a.h.wilt...@student.tue.nl> wrote:
> > Not sure but is there a chance that the username is an empty string > > like "" or has a stray space perhaps? And therefore not considered > > empty?
> > If not... Beats me! :D
> > On 8 feb, 17:31, Tomek Mazur <tmazu...@gmail.com> wrote:
> > > Hi,
> > > I have this weird problem. I set up validation rules but cake seems to > > > ignore them. Here is my model and controller:http://bin.cakephp.org/view/309506151
> > > which obviously sould not validate, yet the first debug returns > > > 'true'. This is driving me crazy, my controller is kind of 'nasty', > > > because I was trying to debug the problem.
Yeah, that's it. :) Now I feel kind of ashamed for making this thread, but I guess it was the only way to figure this out. I was searching too deep. Thank you.
On 10 Lut, 05:05, "Dr. Loboto" <drlob...@gmail.com> wrote:
> Check this model filename. Should be post_comment.php. This model may > be not loaded at all if you named it wrong. In this case $this->PostComment in controller will be of class AppModel and won't have
> your validation rules, of course.
> On Feb 9, 9:54 pm, Tomek Mazur <tmazu...@gmail.com> wrote:
> > Nope. I tried this with other rules: minLength, maxLength and it > > always validates. It seems like the rules are simply ignored. It > > occours only in this one specific model. Don't know what's behind > > this...
> > On 9 Lut, 15:49, Céryl <c.a.h.wilt...@student.tue.nl> wrote:
> > > Not sure but is there a chance that the username is an empty string > > > like "" or has a stray space perhaps? And therefore not considered > > > empty?
> > > > I have this weird problem. I set up validation rules but cake seems to > > > > ignore them. Here is my model and controller:http://bin.cakephp.org/view/309506151
> > > > which obviously sould not validate, yet the first debug returns > > > > 'true'. This is driving me crazy, my controller is kind of 'nasty', > > > > because I was trying to debug the problem.