Just for documentation purposes, I've done that on forum new on forums/tcl/form-procs.tcl
set forum_name_max_size [ad_call_proc_if_exists db_column_size forums_forums name]
template::element create $form_name ${prefix}name \
-label [_ forums.Name] \
-datatype text \
-widget text \
-html "size 60 maxlength $forum_name_max_size" \
-validate {
blank {expr ![empty_string_p [string trim $value]]} { # forums.Forum_Name_can_not_be_blank # }
toolarge {expr [string bytelength $value] <= 200 } { # forums.name_max_chars # }
}
Note that catalog keys are spaced to be shown here instead of translated