Index: openacs-4/packages/acs-templating/tcl/data-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/data-procs.tcl,v diff -u -r1.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-templating/tcl/data-procs.tcl 20 Jan 2003 13:38:24 -0000 1.6.2.1 +++ openacs-4/packages/acs-templating/tcl/data-procs.tcl 24 Jan 2003 09:31:40 -0000 1.6.2.2 @@ -91,6 +91,19 @@ return $result } +ad_proc -public template::data::validate::email { value_ref message_ref } { + + upvar 2 $message_ref message $value_ref value + + set result [util_email_valid_p $value] + + if { ! $result } { + set message "Invalid email format \"$value\"" + } + + return $result +} + ad_proc -public template::data::validate::url { value_ref message_ref } { upvar 2 $message_ref message $value_ref value