Ran into this seemingly simple problem which I have not been able to solve :(
I have User model which hasOne Profile model
The users/add view has fields for both User and Profile with
corresponding tagErrorMsg like
$html->tagErrorMsg("Users/username") and
$html->tagErrorMsg("Profile/fullname") etc
In the users_controller - add action - I do
$user_validates = $this->User->validates();
$profile_validates = $this->User->Profile->validates();
Subsequently I test if both are true and do the needful to save both
models. (setting user_id in profile after saving user and the works)
- If the all data is valid saving works.
- If the User data is not valid I see error messages rendered via tagErrorMsg
- BUT if Profile data is not valid no error messages are rendered.
What would be the simplest way to solve this?
In other words how to get tagErrorMsg to render validationErrors from
an associated hasOne model with minimal coding and what would be the
correct cakePHP way to do it.
Thanks in advance
Tarique
--
=============================================================
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=============================================================
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---