Index: openacs-4/packages/acs-templating/www/doc/demo/list5/view-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/list5/view-one.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/doc/demo/list5/view-one.tcl 10 Sep 2015 08:22:14 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/doc/demo/list5/view-one.tcl 26 Jul 2016 10:32:38 -0000 1.2.2.2 @@ -7,8 +7,18 @@ context:onevalue title:onevalue body:onevalue +} -validate { + valid_note_id -requires template_demo_note_id { + if {![db_0or1row note_exists { + select 1 from template_demo_notes + where template_demo_note_id = :template_demo_note_id + }]} { + ad_complain "Invalid note ID" + } + } } + set context [list "One note"] db_1row note_select {