https://jqueryvalidation.org/documentation/

https://jqueryvalidation.org/documentation/

API Documentation

You're probably looking for

If not, read on.

Throughout the documentation, two terms are used very often, so it's important that you know their meaning in the context of the validation plugin:

  • method: A validation method implements the logic to validate an element, like an email method that checks for the right format of a text input's value. A set of standard methods is available, and it is easy to write your own.
  • rule: A validation rule associates an element with a validation method, like "validate input with name "primary-mail" with methods "required" and "email".

The validate method returns a Validator object that has a few public methods that you can use to trigger validation programmatically or change the contents of the form. The validator object has more methods, but only those documented here are intended for usage.

There are a few static methods on the validator object:

A set of standard validation methods is provided:

原文地址:https://www.cnblogs.com/chucklu/p/12605111.html