Yup!!!
I believe that's a very good way to validate existing fields and
output errors for it.

What about the non-existing fields?

Example:
Password: <input>abc
Verify Password: <input>abc

Personally, I would feel that a notice like "account/verify_password
was not inserted because field don't exist in table `account`" would
be very very useful.

Anybody have a way to output such messages automatically?
Because I feel that there will be times I mis-spell some fields and it
resulted in the field not inserted into database.
It would aid so much in the process of debugging.
I'm sure it will have many other uses...

On Dec 28, 8:04 pm, car-television <[EMAIL PROTECTED]> wrote:
> On Dec 28, 4:11 am, ProFire <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > True True!
>
> > It's still best to look at the source code to find out the possible
> > errors.
> > Is there a way to detect and output errors when they occur?
>
> > Like if I wanted to save, but no insert/update query was called, I
> > would like an output saying "insert fail because XXX is null" or
> > something similar...
>
> > On Dec 28, 12:39 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hi ProFire,
>
> > > I get this feeling that asking that question is somewhat similar to
> > > asking: "Causes of my-car-won't-start", there are endless
> > > possibilities. I guess the best way to find out yourself is to look at
> > > the source code of Model::save()
>
> hi,
>
> i think you should put data validation rules in your model. then you
> will get this kind of error messages for each form field.
>
> ciao
> danny- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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