RE: [coldbox:18026] New to Coldbox - Validation Question

You’ll find lots of answers to that questions, and honestly they’re all right as long as they work well for you. I’ll share what I do typically here are work. We usually do front-end validation with the jQuery validate plugin. If we have a view file called /views/home/products.cfm, then we’ll create a matching JS file called /js/home/products.js that we include with the HTMLHelper plugin on the view page. The js file binds to the form and does what it needs.

Our server side validation started as mostly a series of checks in our handlers after forms were submitted that used the messagebox plugin to render error messages and then redirected back to the form page. The later stuff we’ve wrote, we’ve just made custom validate() methods in our beans and called those after setting the data.

We probably would have used the ColdBox validation had it existed when we first started using ColdBox, but we got stuck in our ways long before it came out :slight_smile:

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

As far as I know, ValidateThis is the only CFML validation tool that will generate client and server side validation based off the same configuration. Hyrule is another option if you plan to write your own client-side validation.