Blog Author: Jeff Chastain

Jeff Chastain is one of "those" developers who grew up taking summer programming classes in grade school just for fun. He used that strong foundation to create a career out of developing software applications using object-oriented programming, which Jeff has been doing for more than a decade, including more than eight years with Adobe toolset-based applications. His current work focuses on object-oriented programming and project management for a variety of clients in order to help them streamline processes and improve user experiences. Jeff is highly adept at evaluating an entire application to break it down into manageable parts for development using a variety of different frameworks. He is an accomplished writer who has published a number of articles in various industry publications.

Categories
Blog Archives
Blog RSS Feed

RSS FeedSubscribe to our RSS feed or Atom feed.

The Alagad Technical Team Blog

Introducing Validat - A Data Validation Engine for ColdFusion

Published By: Jeff Chastain on Oct 11, 2007 at 10:10 AM
Categories: ColdFusion , Validat

Some time back, I posted a series of blog entries regarding data validation, seeking input on how developers approached the issue.  I felt at the time, and still do, that data validation is not something that should have to be rewritten from scratch for each new application.  Sure, validation rules are different, but the core concept of data validation is no different.

After trying to grab every bit of free time over the last couple of months, I would like to introduce Validat, an open source data validation engine for ColdFusion.  The code is currently available and marked as Alpha until I can get some more documentation written (the bane of every open source project!).  Once the initial pass at the documentation is complete, we already have a refactoring planned, but I want to get your input and feedback.  So, take a look when you have a spare moment and let us know what you like and don't like.

Where do I find more information?

A Trac site has been setup for the project at http://trac.alagad.com/Validat and this site contains the information currently available about Validat and will continue to be added to over the coming days and weeks.

To get the source for Validat, an anonymous SVN repository is available at http://svn.alagad.com/Validat.  The main trunk is all there is at the moment.  We will start adding tags as development progresses and the code gets tighter.

To ask any questions or provide feedback, a Google Group site has been setup as well at http://groups.google.com/group/Validat.  Please sign up and fire away with your questions or comments.

An Overview of Validat

Validat is a data validation engine that is broken up into 3 parts ... a collection of pluggable validators, one or more data transformers and one or more data set configurations.

The validators allow you to build your own custom validation rules. This could be as simple as checking that a given data field (element) contains a value or as complex as running tests based upon multiple data fields, talking to a database or web service, etc. The idea is that no validation framework can imagine every possible test, so this allows you to easily add your own validation routines.

The data transformers abstract out the concept of where the data being validated is coming from. This way, we can have a simple form structure transformer that knows to retrieve data out of the form scope and send it to the validation engine. We also have a basic bean transformer that inspects a bean and grabs its data based upon each getter method. The goal here again is abstracting out where the data is coming from so if you prefer to validate beans vs. form data, you can do whatever you wish.

The last piece to the puzzle is the data set configuration. Basically what this is is a mapping between data elements and validation rules. For example, the firstName data element requires the "required" valdiator to be run. Through this mapping your can also setup mappings between groups of fields - for example a validation rule for the firstName, lastName, and emailAddress data elements to determine if they represent a unique user. This mapping can be setup via an XML configuration or via a programmatic API if you want to store and manage the rules via your application (a dynamically built form for example).

More information is to come via the Trac site and again, in the mean time, feel free to post a question or comment in the Validat Google Groups site.

2 responses to “Introducing Validat - A Data Validation Engine for ColdFusion”

Looks familiar =)

Eric: Some of the concepts are the same as we discussed before (form validation ;-)), but the implementation is much more flexible and robust.

Check it out, I would like to hear your feedback.

Leave a Reply