Re: custom model validation question

2012-06-06 Thread Michael Gaiser
I guess my question is: How do you get access to all the other associated data that is being saved? I can set it up so I catch it before the save happens, but it feels kind of hacky and does not make use of the field error message code. -- Our newest site for the community: CakePHP Video

Re: custom model validation question

2012-06-06 Thread Michael Gaiser
ok. i figured it out. The models being saved can be accessed in the validation rule through $this-data. On Wed, Jun 6, 2012 at 10:29 AM, Michael Gaiser mjgai...@gmail.com wrote: I guess my question is: How do you get access to all the other associated data that is being saved? I can set it up

custom model validation question

2012-06-05 Thread Michael Gaiser
I have a Domain Model that has 4 has Many relationships with 4 different join models (Character, Clan, Covenant, Coterie). When creating a new record, the user is presented with 4 option boxes, each filled with different data pertaining to the 4 associated models but defaulting to an empty option.

Re: custom model validation question

2012-06-05 Thread John Hardy
Write your own validation routine. On Jun 5, 2012, at 5:45 PM, Michael Gaiser wrote: I have a Domain Model that has 4 has Many relationships with 4 different join models (Character, Clan, Covenant, Coterie). When creating a new record, the user is presented with 4 option boxes, each filled

Re: custom model validation question

2012-06-05 Thread Michael Gaiser
ok... How would you test if other associations were submitted? The example in the docs does not really work for what I want to test against. How do I get access to all the other fields submitted to be saved? On Tue, Jun 5, 2012 at 9:44 PM, John Hardy john.c.ha...@gmail.com wrote: Write your own