diff --git a/system/views/formcontrols/layouts/form.cfm b/system/views/formcontrols/layouts/form.cfm index 6251b32ada..ece5cf9e98 100644 --- a/system/views/formcontrols/layouts/form.cfm +++ b/system/views/formcontrols/layouts/form.cfm @@ -53,13 +53,18 @@ + - ( function( $ ){ - var validator = $('###formId#').validate() - , options = #validationJs#; + ( function( $ ) { + if ( typeof executeWithFormBuilderDependencies !== 'undefined' ) { + executeWithFormBuilderDependencies( function( $ ) { + var validator = $( '###formId#' ).validate() + , options = #validationJs#; - validator.settings.rules = $.extend( validator.settings.rules , options.rules ); - validator.settings.messages = $.extend( validator.settings.messages, options.messages ); + validator.settings.rules = $.extend( validator.settings.rules , options.rules ); + validator.settings.messages = $.extend( validator.settings.messages, options.messages ); + } ); + }; } )( #validationJsJqueryRef# );