ad_page_contract_filter_proc_string_length (public)
ad_page_contract_filter_proc_string_length name value_varname length
Defined in packages/acs-tcl/tcl/tcl-documentation-procs.tcl
Checks whether the string is less or greater than the minimum or maximum length specified, inclusive e.g.address_1:notnull,string_length(max|100) will test address_1 for maximum length of 100.
- Parameters:
- name
value_varname
length
- Author:
- Randy Beggs <randyb@arsdigita.com>
- Created:
- August 2000
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_page_contract_filters
Source code: upvar $value_varname value set actual_length [string length $value] lassign $length op nr if { $op eq "min" } { if { $actual_length < $nr } { set binding [list name $name actual_length $actual_length min_length $nr] ad_complain [_ acs-tcl.lt_name_is_too_short__Pl_1 $binding] return 0 } } else { if { $actual_length > $nr } { set binding [list name $name actual_length $actual_length max_length $nr] ad_complain [_ acs-tcl.lt_name_is_too_long__Ple_1 $binding] return 0 } } return 1XQL Not present: Generic, PostgreSQL, Oracle