Re: Extended Validation !?

2007-12-16 Thread ianh
There is also a conditional validation behaviour around somewhere. It is not listed on the bakery but you can find references to it through Google. I have a customised version if you want it else if someone else knows where it has got to that would be great. On Dec 15, 10:29 pm, Adam Royle

Extended Validation !?

2007-12-15 Thread stefuNz
Hi! I want to use validation for the following situation: I have a select field (field1) with options a,b,c If field1 is a or b then field2 and field3 may not be empty (text fields) if field1 is c then field4 may not be empty ... is there a way to use the validation for this or has it to be

Re: Extended Validation !?

2007-12-15 Thread Chris Hartjes
On Dec 15, 2007 2:34 PM, stefuNz [EMAIL PROTECTED] wrote: Hi! I want to use validation for the following situation: I have a select field (field1) with options a,b,c If field1 is a or b then field2 and field3 may not be empty (text fields) if field1 is c then field4 may not be empty ...

Re: Extended Validation !?

2007-12-15 Thread stefuNz
hi chris! i think i found what you meant ... custom validation methods, right? but i have one little problem. i don't know how to access field2, field3, field4 when validating field1... here's my approach: var $validate = array( 'field1' = array( 'rule' =

Re: Extended Validation !?

2007-12-15 Thread Adam Royle
Use... $this-data[$this-name]['fieldname'] function checkEmpty($value) { $valid = false; if ($value == 'c' !empty($this-data[$this-name]['field4']) { $valid = true; } elseif (($value == 'a' || $value == 'b')