Skip to content

Commit 9df8a54

Browse files
committed
List all API docs on page documentation page
1 parent f3cecd6 commit 9df8a54

File tree

1 file changed

+40
-81
lines changed

1 file changed

+40
-81
lines changed

pages/documentation.md

Lines changed: 40 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -70,106 +70,65 @@ Throughout the documentation, two terms, that you need to know about and their m
7070
* **method**: A validation method implements the logic to validate an element, like an email method that checks for the right format of an text input's value. A set of standard methods is available, and it is easy to write your own.
7171
* **rule**: A validation rule associates an element with a validation method, like "validate input with name "primary-mail" with methods "required" and "email".
7272

73-
For now, use the search or these category pages to look for API documentation entries:
74-
75-
* [jQuery plugins](/category/plugin/)
76-
* [Validator methods](/category/validator/)
77-
* [all methods](/category/methods/)
78-
* [Custom selectors provided by the plugin](/category/selectors/)
79-
80-
<!--
81-
For a start, the validate-method:
82-
8373
## Plugin methods
8474

85-
{{APIList|
86-
{{APIListHeader|Plugin methods}}
87-
{{:Plugins/Validation/validate}}
88-
{{:Plugins/Validation/valid}}
89-
{{:Plugins/Validation/rules}}
90-
{{:Plugins/Validation/removeAttrs}}
91-
}}
75+
This library adds three jQuery plugin methods, the main entry point being the `validate` method:
9276

93-
## Custom selectors
77+
* [`validate()` - Validates the selected form.](/validate)
78+
* [`valid()` - Checks whether the selected form or selected elements are valid.](/valid)
79+
* [`rules()` - Read, add and remove rules for an element.](/rules)
9480

95-
{{APIList|
96-
{{APIListHeader|Custom selectors}}
97-
{{:Plugins/Validation/blank}}
98-
{{:Plugins/Validation/filled}}
99-
{{:Plugins/Validation/unchecked}}
100-
}}
81+
## Custom selectors
10182

102-
## Utilities
83+
This library also extends jQuery with three custom selectors:
10384

104-
{{APIList|
105-
{{APIListHeader|String utilities}}
106-
{{:Plugins/Validation/jQuery.validator.format}}
107-
}}
85+
* [`:blank` - Selects all elements with a blank value.](/blank-selector)
86+
* [`:filled` - Selects all elements with a filled value.](/filled-selector)
87+
* [`:unchecked` - Selects all elements that are unchecked.](/unchecked-selector)
10888

10989
## Validator
11090

11191
The validate method returns a Validator object that has a few public methods that you can use 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.
11292

113-
{{APIList|
114-
{{APIListHeader|Validator methods}}
115-
{{:Plugins/Validation/Validator/form}}
116-
{{:Plugins/Validation/Validator/element}}
117-
{{:Plugins/Validation/Validator/resetForm}}
118-
{{:Plugins/Validation/Validator/showErrors}}
119-
{{:Plugins/Validation/Validator/numberOfInvalids}}
120-
}}
93+
* [`Validator.form()` - Validates the form.](/Validator.form)
94+
* [`Validator.element()` - Validates a single element.](/Validator.element)
95+
* [`Validator.resetForm()` - Resets the controlled form.](/Validator.resetForm)
96+
* [`Validator.showErrors()` - Show the specified messages.](/Validator.showErrors)
97+
* [`Validator.numberOfInvalids()` - Returns the number of invalid fields.](/Validator.numberOfInvalids)
12198

12299
There are a few static methods on the validator object:
123100

124-
{{APIList|
125-
{{APIListHeader|Validator functions}}
126-
{{:Plugins/Validation/Validator/setDefaults}}
127-
{{:Plugins/Validation/Validator/addMethod}}
128-
{{:Plugins/Validation/Validator/addClassRules}}
129-
}}
101+
* [`jQuery.validator.addMethod()` - Add a custom validation method.](/jQuery.validator.addMethod)
102+
* [`jQuery.validator.format()` - Replaces {n} placeholders with arguments.](/jQuery.validator.format)
103+
* [`jQuery.validator.setDefaults()` - Modify default settings for validation.](/jQuery.validator.setDefaults)
104+
* [`jQuery.validator.addClassRules()` - Add a compound class method.](/jQuery.validator.addClassRules)
130105

131106
## List of built-in Validation methods
132107

133108
A set of standard validation methods is provided:
134109

135-
{{APIList|
136-
{{APIListHeader|Methods}}
137-
{{:Plugins/Validation/Methods/required}}
138-
{{:Plugins/Validation/Methods/remote}}
139-
{{:Plugins/Validation/Methods/minlength}}
140-
{{:Plugins/Validation/Methods/maxlength}}
141-
{{:Plugins/Validation/Methods/rangelength}}
142-
{{:Plugins/Validation/Methods/min}}
143-
{{:Plugins/Validation/Methods/max}}
144-
{{:Plugins/Validation/Methods/range}}
145-
{{:Plugins/Validation/Methods/email}}
146-
{{:Plugins/Validation/Methods/url}}
147-
{{:Plugins/Validation/Methods/date}}
148-
{{:Plugins/Validation/Methods/dateISO}}
149-
{{:Plugins/Validation/Methods/number}}
150-
{{:Plugins/Validation/Methods/digits}}
151-
{{:Plugins/Validation/Methods/creditcard}}
152-
{{:Plugins/Validation/Methods/equalTo}}
153-
}}
154-
155-
Some more methods are provided as addons, currently included in additional-methods.js in the download package.
156-
157-
{{APIList|
158-
{{:Plugins/Validation/Methods/accept}}
159-
{{:Plugins/Validation/CustomMethods/extension}}
160-
{{:Plugins/Validation/CustomMethods/minWords}}
161-
{{:Plugins/Validation/CustomMethods/maxWords}}
162-
{{:Plugins/Validation/CustomMethods/rangeWords}}
163-
{{:Plugins/Validation/CustomMethods/letterswithbasicpunc}}
164-
{{:Plugins/Validation/CustomMethods/alphanumeric}}
165-
{{:Plugins/Validation/CustomMethods/lettersonly}}
166-
{{:Plugins/Validation/CustomMethods/nowhitespace}}
167-
{{:Plugins/Validation/CustomMethods/ziprange}}
168-
{{:Plugins/Validation/CustomMethods/vinUS}}
169-
{{:Plugins/Validation/CustomMethods/dateITA}}
170-
{{:Plugins/Validation/CustomMethods/phoneUS}}
171-
}}
172-
-->
110+
* [`required` - Makes the element required.](/required-method)
111+
* [`remote` - Requests a resource to check the element for validity.](/remote-method)
112+
* [`minlength` - Makes the element require a given minimum length.](/minlength-method)
113+
* [`maxlength` - Makes the element require a given maxmimum length.](/maxlength-method)
114+
* [`rangelength` - Makes the element require a given value range.](/rangelength-method)
115+
* [`min` - Makes the element require a given minimum.](/min-method)
116+
* [`max` - Makes the element require a given maximum.](/max-method)
117+
* [`range` - Makes the element require a given value range.](/range-method)
118+
* [`email` - Makes the element require a valid email](/email-method)
119+
* [`url` - Makes the element require a valid url](/url-method)
120+
* [`date` - Makes the element require a date.](/date-method)
121+
* [`dateISO` - Makes the element require a ISO date.](/dateISO-method)
122+
* [`number` - Makes the element require a decimal number.](/number-method)
123+
* [`digits` - Makes the element require digits only.](/digits-method)
124+
* [`creditcard` - Makes the element require a creditcard number.](/creditcard-method)
125+
* [`equalTo` - Requires the element to be the same as another one](/equalTo-method)
126+
127+
Some more methods are provided as addons, currently included in additional-methods.js in the download package. Not all of them are documented here:
128+
129+
* [`accept` - Makes a file upload accept only specified mime-types.](/accept-method)
130+
* [`extension` - Makes the element require a certain file extension.](/extension-method)
131+
* [`phoneUS` - Validate for valid US phone number.](/phoneUS-method)
173132

174133
# [General Guidelines](/reference)
175134

0 commit comments

Comments
 (0)