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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -