This doesn't address exactly what you're proposing Ian, but this already exists in CF for client side at least: cfform/cfinput.
That is true. I was thinking of a larger, more robust system. But yes using the cfform/cfinput is an example of exactly what I am talking about. With these tags CF creates both the server side AND JS client side code to validate form controls. They existed at least as far back as CF4.5, but have been improved upon considerable from version to version. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275614 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4