xowiki::validate_form_field (private)
xowiki::validate_form_field field_name
Defined in packages/xowiki/tcl/xowiki-form-procs.tcl
Validate a caller's field value using the active WikiForm field object. Report any validation error to the user.
- Parameters:
- field_name (required)
- Name of the form field and its value variable.
- Returns:
- 1 on success, or 0 on validation failure.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: 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_name set data [$form set data] # # Get the form-field and set its value.... # set f [$data lookup_form_field -name $field_name [$form set 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 1XQL Not present: Generic, PostgreSQL, Oracle