How to query the validation of a specific field in javascript/jquery

asp.net-mvc-4, jquery, jquery-validate, unobtrusive-validation

Solution

You practically answered your own question :) Use `.valid()`.

http://docs.jquery.com/Plugins/Validation/valid

You can call `.valid()` on elements directly.

$("#myElement").valid();

You can also trigger validation this way. http://docs.jquery.com/Plugins/Validation/Validator/element

$("#myForm").validate().element("#myElement");

Problem

With a simple MVC4 application I have a simple view with a simple form with some fields that have some simple validations (required, max/min, length, etc.). I have both ClientValidationEnabled and UnobtrusiveJavaSciptEnabled set to true. What I want to do is, at any point in time, in javascript, ask if any one particular input field in my form will pass validation with the contents currently in the field. I realize I can call `$("#MyForm").valid()` and know if the whole form itself passes validation. What I want to do is ask this question for any one particular field.

Original source