The following script works fine:
$("#regform").validate().showErrors({"username":"message"});
After I changed the script to the bottom, it does not work.
var name = "username"; $("#regform").validate().showErrors({name:"message"});
I need to pass the field name of the variable. Does anyone know how this problem can be solved?
jquery jquery-plugins
Alan
source share