ValidateThis ColdBox Plugin Update
Posted At : November 11, 2009 9:58 AM | Posted By : Bob Silverberg
Related Categories: ValidateThis
Thanks to John Whish, a bug in the ValidateThis ColdBox plugin has been fixed, so a new version is available at the RIAForge project site.
ValidateThis is a validation framework for ColdFusion objects that provides automatic server-side and client-side validations, plus a whole lot more. I have recently started using Git for version control for ValidateThis, and have moved the source code to GitHub. This made it extremely easy for John to create his bug fix and submit it to me for inclusion in the plugin. If anyone is interested in contributing to the project (either the plugin or the core), you can fork the corresponding Git repo from my GitHub page.
John and I are working on some sample code that will demonstrate the integration between ValidateThis and ColdBox, and which will be included in the RAIForge download in the near future.
If you are interested in learning more about ValidateThis, there are a number of resources available:
- I recorded a presentation for the Online ColdFusion Meetup, which is available here.
- The code for the framework, including a number of sample applications is available from the Riaforge Site, validatethis.riaforge.org.
- A number of online demos can be viewed at www.validatethis.org.
- If you have any questions at all about the framework or how to implement and use it, they can be directed to the ValidateThis! Google Group at groups.google.com/group/validatethis.
I have a few additions to ValidateThis I'd be interested in contributing - I just need to get sorted in github (and find some free time)!
Regarding contributions - that would be excellent!
Is this be done in the coldbox.xml.cfm file, or each time you getMyPlugin("ValidateThisCBPlugin")?
Could you provide a persistent, best practices example?
Thanks,
Thomas
Currently it is done via individual settings in your coldbox.xml.cfm file, although John Whish has submitted an enhancement to allow for a single setting of a structure, which I've been too lazy to release yet. ;-)
For now, the following settings are available to you:
VT_JSRoot, VT_definitionPath, VT_defaultFormName, VT_DefaultJSLib, VT_BOValidatorPath, VT_TranslatorPath, VT_LocaleLoaderPath, VT_localeMap, and VT_defaultLocale
The ones you'd probably be most interested in are VT_JSRoot and VT_definitionPath.
To set them you'd just add settings to your coldbox.xml.cfm file, like so:
<YourSettings>
<Setting name="VT_JSRoot" value="library/js" />
<Setting name="VT_definitionPath" value="/myModel" />
</YourSettings>