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
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
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 ...
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' =
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')