What code are you using in the view to generate the form fields and display the error messages?
On Mar 31, 9:44 am, Preloader <[EMAIL PROTECTED]> wrote: > Hello Bakers, > > I have a problem with the Model::saveAll function and the display of > validation errors. I'm not sure if this is a bug or if I did something > wrong. Maybe one of you could help me out! > > MODELS: > Location: > - name (alphaNumeric) > - ... > - ... > > Address: > - ... > - postalcode (postal) > - ... > > ASSOCIATIONS: > - Location hasOne Address > - Address belongsTo Location > > My form contains the fields for both models. After submitting the form > I do the following in the Locations controller: > > $this->Location->saveAll($this->data); > > Afterwards $this->Location->validationErrors looks like this: > > Array > ( > [Location] => Array > ( > [name] => Please enter an alphanumeric value > ) > > [Address] => Array > ( > [postalcode] => Please enter a valid postal code > ) > ) > > The validation error for Location.name will not be displayed, the > error for Address.postalcode shows up correctly. > > For testing purposes I reformed the validationErrors array manually to > this: > > Array > ( > [name] => Please enter an alphanumeric value > > [Address] => Array > ( > [postalcode] => Please enter a valid postal code > ) > ) > > This time all validation errors are displayed correctly. Am I doing > something wrong here or might there be a bug in model.php or the > FormHelper? > > Many thanks, > Christoph --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
