set form ::xowiki::f1 ;# form has to be named this way for the time being#set form [lindex [::xowiki::WikiForm info instances -closure] 0]## Generic ad_compliant validator using validation methods from# form_fields#upvar$field_name$field_nameset data [$formset data]
## Get the form-field and set its value....#set f [$data lookup_form_field -name $field_name [$formset form_fields]]
$f value [set$field_name]
set validation_error [$f validate $data]
## If we get an error, we report it as well via util-user message##$form log "***** field_name = $field_name, validation_error=$validation_error"if {$validation_error ne ""} {
util_user_message -message "Error in field [$f label]: $validation_error"return 0
}
return 1