How to retrieve a form's validator

jquery-validate

Solution

You want:

var validator = $("#form_id").data("validator");

Problem

What is the correct way to get the current jQuery validator object for an existing form? Note, the validator is being configured using the jQuery Unobtrusive validation plugin hence why I don't have a reference to it.

Original source