Re: how to validate two unique fields together?

2010-02-05 Thread sebb86
matzehahn Thanks for this link. Unfortunately this source don't worked with my edit-function (add worked). I tryed to change the source, but without success. BrendonKoz Thanks also for your help. I tryed some hours to get all this working but also without success. Fortunately, i found a

how to validate two unique fields together?

2010-02-03 Thread sebb86
Hello, my table **rooms** contains three fields: //id//, //building_id// and //room//. //Building_id// and //room// have to be UNIQUE together, because room 9 is in building 1 only one time but room 9 can also conained in building 2. The //building_id// in the view is realized as a drop-down

Re: how to validate two unique fields together?

2010-02-03 Thread matzeh...@googlemail.com
take a look at: http://www.mail-archive.com/cake-php@googlegroups.com/msg33243.html they discussed the Problem an found a nice solution! On 3 Feb., 08:47, sebb86 kahlc...@googlemail.com wrote: Hello, my table **rooms** contains three fields: //id//, //building_id// and //room//.

Re: how to validate two unique fields together?

2010-02-03 Thread BrendonKoz
I'm not sure I understand the problem directly, so I'll just try to give an example of how you can use the model class' custom validation methods to handle a validation of two fields at the same time. From the book, check out how to manage custom validations (http://