Integrating cfUniForm and ValidateThis

Posted on February 16, 2010 at 7:16 PM in Uni-Form Tag Library, ColdFusion

As noted in the cfUniForm documentation, Bob Silverberg's ValidateThis validation framework plays quite nicely with cfUniForm. However, there is one "gotcha" that I have been meaning to blog about for awhile now, but keep forgetting.

Like cfUniForm, ValidateThis utilizes jQuery's validation plugin to handle client-side form validations. There is, however, one really important key to avoiding JavaScript errors on your cfUniForm + ValidateThis forms:

Make sure you call VT's getValidationScript() method after you close your cfUniForm-powered form. So, your code should look this...

  1. </uform:form><!--- close your form FIRST! --->
  2. <!--- now call VT's getValidationScript() method --->
  3. <cfhtmlhead text="#application.ValidateThis.getValidationScript(myObject)#" />

For additional integration details, be sure to check out Bob's ValidateThis + cfUniForm integration demo.

Comments
(Comment Moderation is enabled. Your comment will not appear until approved.)

Latest Articles

Eventually something really brilliant and witty will appear right here.

Calendar

July 2010
S M T W T F S
« Jun  
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Subscribe

Enter a valid email address.

The Obligatory Wish List