template::data::validate::keyword (public)

 template::data::validate::keyword value_ref message_ref

Defined in packages/acs-templating/tcl/data-procs.tcl

Validate that a submitted keyword consists of alphnumeric or "_" characters.

Parameters:
value_ref (required)
Reference variable to the submitted value
message_ref (required)
Reference variable for returning an error message
Returns:
True (1) if valid, false (0) if not

Partial Call Graph (max 5 caller/called nodes):
%3 test_validate_keyword validate_keyword (test acs-templating) template::data::validate::keyword template::data::validate::keyword test_validate_keyword->template::data::validate::keyword _ _ (public) template::data::validate::keyword->_

Testcases:
validate_keyword
Source code:

    upvar 2 $message_ref message $value_ref value

    set result [regexp {^[a-zA-Z0-9_]+$} $value]

    if { ! $result } {
        set message "[_ acs-templating.Invalid_keyword] \"[ns_quotehtml $value]\""
    }

    return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: