Very simple example when I use function inside 'required' that should run on actual form validation but it also does execute on load of the page.
The question is how to avoid it and make so it would call other function inside required only on actual validation.
$("form").validate({
rules : {
testinput: {
required: runFunction('hello world')
}
});
function runFunction(a){
console.log(a);
}