Photo from Chile

ValidateThis 0.93 - Automatic Property Descriptions

I've just released version 0.93 of ValidateThis, my validation framework for ColdFusion objects. It includes a small bug fix that affected the dependentPropertyValue param when used with ColdFusion ORM objects, and also includes one small enhancement.

Automatic Property Descriptions

Until this release, if you wanted the description of your property to be different from its name, you had to provide a desc attribute for the property in the xml file. For example, you might have a property called firstName. In order to have ValidateThis generate failure messages with First Name in them you would have had to define your property like so:

<property name="firstName" desc="First Name">

While working on my presentation for cf.Objective() I realized that I could relieve some of this burden by allowing the framework to do this for you automatically. So now, as of version 0.93, any property names that are camelCased will be automatically assigned descriptions, which will comprise of each word capitalized. So firstName becomes First Name and numberOfCarsOwned becomes Number Of Cars Owned, etc.

I'm finding this very useful, and I hope others will too.

As always, the latest code is available from the ValidateThis RIAForge site, and if you have any questions about the framework, or suggestions for enhancements, please send them to the ValidateThis Google Group.

Comments