template::data::validate::email (public)

 template::data::validate::email value_ref message_ref

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

Validate that a submitted email address is syntactically correct.

Parameters:
value_ref - Reference variable to the submitted value
message_ref - 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_email validate_email (test acs-templating) template::data::validate::email template::data::validate::email test_validate_email->template::data::validate::email _ _ (public) template::data::validate::email->_ util_email_valid_p util_email_valid_p (public) template::data::validate::email->util_email_valid_p

Testcases:
validate_email
Source code:

    upvar 2 $message_ref message $value_ref value

    set result [util_email_valid_p $value]

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

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