Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.320.2.15 -r1.320.2.16 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 27 May 2014 07:33:51 -0000 1.320.2.15 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 25 Jul 2014 19:07:52 -0000 1.320.2.16 @@ -1807,6 +1807,21 @@ return 1 } + Page ad_instproc validate=form_input_fields {form_fields} { + # + # This is the form-level validator, which might be used to perform + # validation based on e.g. multiple depending formfields. The + # validator can be used to test inter-dependencies between + # form-fields and should set the error fields of the reporting + # form field(s) via + # + # $f error_msg "some error...." + # + # This method can be refined by e.g. a workflow. + # + return 1 + } + Page ad_instproc get_form_data {-field_names form_fields} { Get the values from the form and store it in the form fields and @@ -1964,6 +1979,10 @@ set validation_errors [my mutual_overwrite_occurred] } + if {[my validate=from_input_fields $form_fields]} { + incr validation_errors + } + if {$validation_errors == 0} { # # Postprocess based on form fields based on form-fields methods.