ad_page_contract_filter_proc_usphone (public)

 ad_page_contract_filter_proc_usphone name value_varname

Defined in packages/acs-tcl/tcl/tcl-documentation-procs.tcl

Checks whether the value is more or less a valid US phone number with the area code. Exact filter is XXX-XXX-XXXX

Parameters:
name
value_varname
Author:
Randy Beggs <randyb@arsdigita.com>
Created:
22 August 2000

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_complain ad_complain (public) ad_page_contract_filter_proc_usphone ad_page_contract_filter_proc_usphone ad_page_contract_filter_proc_usphone->_ ad_page_contract_filter_proc_usphone->ad_complain

Testcases:
No testcase defined.
Source code:
upvar $value_varname value

    if { [string trim $value] ne ""
         && ![regexp {[1-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]} $value]} {
        ad_complain [_ acs-tcl.lt_name_does_not_appear__1]
        return 0
    }
    return 1
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: