page_validation

EveAndersson.com : API Browser : page_validation

page_validation

page_validation [ args... ]
Defined in packages/acs-core/utilities-procs.tcl

This proc allows page arg, etc. validation. It accepts a bunch of code blocks. Each one is executed, and any error signalled is appended to the list of exceptions. Note that you can customize the complaint page to match the design of your site, by changing the proc called to do the complaining: it's [ad_parameter ComplainProc "" ad_return_complaint] The division of labor between ad_page_variables and page_validation is that ad_page_variables handles programming errors, and does simple defaulting, so that the rest of the Tcl code doesn't have to worry about testing [info exists ...] everywhere. page_validation checks for errors in user input. For virtually all such tests, there is no distinction between "unsupplied" and "null string input". Note that errors are signalled using the Tcl "error" function. This allows nesting of procs which do the validation tests. In addition, validation functions can return useful values, such as trimmed or otherwise munged versions of the input.

[ show source ]

Show another procedure:

eve@eveandersson.com