Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.228 -r1.229 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 19 Mar 2013 19:07:23 -0000 1.228 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Mar 2013 17:59:28 -0000 1.229 @@ -2793,9 +2793,10 @@ CompoundField instproc same_value {v1 v2} { if {$v1 eq $v2} {return 1} - foreach {n1 value1} $v1 {n2 value2} $v2 { - if {![my same_value $value1 $value2]} { return 0 } - } + foreach {n1 value1} $v1 {n2 value2} $v2 { + set f [my set component_index($n1)] + if {![$f same_value $value1 $value2]} { return 0 } + } return 1 } @@ -2810,6 +2811,18 @@ } } + CompoundField instproc validate {obj} { + # Delegate validate to the components. If a validation of a + # component fails, report the error message back. + foreach c [my components] { + set result [$c validate $obj] + if {$result ne ""} { + return $result + } + } + return "" + } + CompoundField instproc set_compound_value {value} { if {[catch {array set {} $value} errorMsg]} { # this branch could be taken, when the field was retyped