I am using the http://jqueryvalidation.org/ to validate my forms and by default this is called when the form gets submitted. I am wanting to start the validation when the function I have wrapped it into is called.
So basically, I have this for the validation:
function ticketCreateSubmit()
{
$("#ticketForm").validate({
...
});
}
And then this is getting called by: ticketCreateSubmit(); in my payments page. The form does have the id of ticketForm. The function does get called, but the validation does not take action?
I searched the validation website and I found that if I put onsubmit: false, it doesn't process it on form submit, but that still didn't get the validation to run when the function is being called?
How would I go about this?
Just so everyone understands, I'm only needing to call the VALIDATION so it runs from the external script. I'm not needing to do anything else. Just execute the validation.
$("#ticketForm").validate()attaches a validator to the form. It's not executing the validation.