javascript - Jquery validation stopped working -


here's call validate function. works fine code.

$('#createform').validate(function () { }); 

but when try modify bit, whole validation stop working:

$('#createform').validate(function () {                errorplacement: function(error, element) {                  error.insertafter(element);                },                debug:true              }); 

any idea?

you shouldn't have function() in there. change to:

$('#createform').validate(     {          errorplacement: function(error, element) {                  error.insertafter(element);          },          debug:true        } ); 

the stuff in { } options. it's not function :)


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -