I have a function that validates a form and I want it to be triggered when the #submit-btn is clicked but the problem is that it is triggered every time the document is load.
$(document).ready(function(){
$("#submit-btn").on('click', validar());
});