Skip to content

Commit b21b6cb

Browse files
DawnValentinejzaefferer
authored andcommitted
Updates, fixing typos and more.
1 parent 0024de1 commit b21b6cb

22 files changed

+92
-90
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

entries/Validator.numberOfInvalids.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<desc>Returns the number of invalid fields.</desc>
1111
<longdesc>This depends on the internal validator state. It covers all fields only after validating the complete form (on submit or via $("form").valid()). After validating a single element, only that element is counted. Most useful in combination with the invalidHandler-option.</longdesc>
1212
<example>
13-
<desc>Displays a summary of invalid fields after a invalid submit.</desc>
13+
<desc>Displays a summary of invalid fields after an invalid submit.</desc>
1414
<code><![CDATA[
1515
var validator = $( "#myform" ).validate({
1616
invalidHandler: function() {

entries/accept-method.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<p>Works with type="file" inputs.</p>
1313

14-
<p>Note: This method used to look at just the filename, specifically the file extension. That behaviour is now available as the "extension" method inside additional-methods.js, same as this "accept" method itself.</p>
14+
<p>Note: This method used to look at just the filename, specifically the file extension. That behaviour is now available as the "extension" method inside additional-methods.js, as is this "accept" method.</p>
1515
</longdesc>
1616
<signature>
1717
<argument name="mimetype" type="String">

entries/creditcard-method.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0"?>
22
<entry name="creditcard" type="method" return="Boolean">
33
<title>creditcard method</title>
4-
<desc>Makes the element require a creditcard number.</desc>
4+
<desc>Makes the element require a credit card number.</desc>
55
<longdesc>
6-
Return true, if the value is a valid creditcard number.
6+
Return true if the value is a valid credit card number.
77
<p>Works with text inputs.</p>
8-
<p>Note: The algorithm used can't verify the validity of the number - it is just a integrity check. As with any other clientside validation, you have to implement the same or better validation on the serverside.</p>
8+
<p>Note: The algorithm used can't verify the validity of the number - it is just an integrity check. As with any other clientside validation, you have to implement the same or better validation on the serverside.</p>
99
</longdesc>
1010
<example>
11-
<desc>Makes "field" required and creditcard only.</desc>
11+
<desc>Makes "field" required and credit card only.</desc>
1212
<code><![CDATA[
1313
$( "#myform" ).validate({
1414
rules: {

entries/date-method.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<title>date method</title>
44
<desc>Makes the element require a date.</desc>
55
<longdesc>
6-
Return true, if the value is a valid date. Uses JavaScripts built-in Date to test if the date is valid, and does therefore no sanity checks. Only the format must be valid, not the actual date, eg 30/30/2008 is a valid date.
6+
Return true if the value is a valid date. Uses JavaScript's built-in Date to test if the date is valid, and therefore does no sanity checks. Only the format must be valid, not the actual date, eg 30/30/2008 is a valid date.
77
<p>This method should not be used, since it relies on the <code>new Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</p>
88
</longdesc>
99
<example>

entries/dateISO-method.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0"?>
22
<entry name="dateISO" type="method" return="Boolean">
33
<title>dateISO method</title>
4-
<desc>Makes the element require a ISO date.</desc>
4+
<desc>Makes the element require an ISO date.</desc>
55
<longdesc>
6-
Return true, if the value is a valid date, according to ISO date standard.
6+
Return true if the value is a valid date according to ISO date standard.
77
<p>Works with text inputs.</p>
88
</longdesc>
99
<example>
10-
<desc>Makes "field" required and a ISO date.</desc>
10+
<desc>Makes "field" required and an ISO date.</desc>
1111
<code><![CDATA[
1212
$( "#myform" ).validate({
1313
rules: {

entries/email-method.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<title>email method</title>
44
<desc>Makes the element require a valid email</desc>
55
<longdesc>
6-
Return true, if the value is a valid email address.
6+
Return true if the value is a valid email address.
77
<p>Works with text inputs.</p>
88
</longdesc>
99
<example>

entries/extension-method.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<signature>
1010
<argument name="extension" type="String" optional="true">
1111
<desc>
12-
The allowed file extensions, seperated via "|" (or a comma, ","), defaults to "png|jpe?g|gif".
12+
The allowed file extensions, seperated with "|" (or a comma, ","), defaults to "png|jpe?g|gif".
1313
</desc>
1414
</argument>
1515
</signature>

entries/jQuery.validator.addMethod.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>jQuery.validator.addMethod()</title>
55
<signature>
66
<argument name="name" type="String">
7-
<desc>The name of the method, used to identify and referencing it, must be a valid javascript identifier</desc>
7+
<desc>The name of the method used to identify it and referencing it must be a valid javascript identifier</desc>
88
</argument>
99
<argument name="method" type="Function">
1010
<desc>The actual method implementation, returning true if an element is valid. First argument: Current value. Second argument: Validated element. Third argument: Parameters.</desc>
@@ -15,20 +15,20 @@
1515
<desc>the element to be validated</desc>
1616
</property>
1717
<property name="value" type="String">
18-
<desc>parameters specified for the method, e.g. for min: 5 the parameter is 5, for range: [1, 5] its [1, 5]</desc>
18+
<desc>parameters specified for the method, e.g. for min: 5, the parameter is 5, for range: [1, 5] it's [1, 5]</desc>
1919
</property>
2020
</argument>
2121
<argument name="message" type="String" optional="true">
22-
<desc>The default message to display for this method. Can be a function created by ''jQuery.validator.format(value)''. When undefined, an already existing message is used (handy for localization), otherwise the field-specific messages have to be defined.</desc>
22+
<desc>The default message to display for this method. Can be a function created by ''jQuery.validator.format(value)''. When undefined, an existing message is used (handy for localization), otherwise the field-specific messages have to be defined.</desc>
2323
</argument>
2424
</signature>
2525
<desc>Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a javascript based function and a default string message.</desc>
2626
<longdesc>The arguments to the callback are:
2727
* the current value of the validated element
2828
* the element to be validated
29-
* parameters specified for the method, e.g. for min: 5 the parameter is 5, for range: [1, 5] its [1, 5]
29+
* parameters specified for the method, e.g. for min: 5 the parameter is 5, for range: [1, 5] it's [1, 5]
3030

31-
Please note: While the temptation is great to add a regex method that checks it's parameter against the value, it is much cleaner to encapsulate those regular expressions inside their own method. If you need lots of slightly different expressions, try to extract a common parameter.
31+
Please note: While the temptation is great to add a regex method that checks its parameter against the value, it is much cleaner to encapsulate those regular expressions inside their own method. If you need lots of slightly different expressions, try to extract a common parameter.
3232

3333
See also a <a href="http://regexlib.com/DisplayPatterns.aspx">library of regular expressions</a>.
3434
</longdesc>

entries/maxlength-method.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<title>maxlength method</title>
44
<desc>Makes the element require a given maxmimum length.</desc>
55
<longdesc>
6-
Return false, if the element is
6+
Return false if the element is
77
<ul>
88
<li>some kind of text input and its value is too long</li>
9-
<li>a set of checkboxes has too many boxes checked</li>
9+
<li>a set of checkboxes and has too many boxes checked</li>
1010
<li>a select and has too many options selected</li>
1111
</ul>
1212
<p>Works with text inputs, selects and checkboxes.</p>

entries/minlength-method.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<title>minlength method</title>
44
<desc>Makes the element require a given minimum length.</desc>
55
<longdesc>
6-
Return false, if the element is
6+
Return false if the element is
77
<ul>
88
<li>some kind of text input and its value is too short</li>
9-
<li>a set of checkboxes has not enough boxes checked</li>
10-
<li>a select and has not enough options selected</li>
9+
<li>a set of checkboxes and doesn't have enough boxes checked</li>
10+
<li>a select and doesn't have enough options selected</li>
1111
</ul>
1212
<p>Works with text inputs, selects and checkboxes.</p>
1313
</longdesc>

entries/rangelength-method.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<title>rangelength method</title>
44
<desc>Makes the element require a given value range.</desc>
55
<longdesc>
6-
Return false, if the element is
6+
Return false if the element is
77
<ul>
88
<li>some kind of text input and its length is too short or too long</li>
9-
<li>a set of checkboxes has not enough or too many boxes checked</li>
10-
<li>a select and has not enough or too many options selected</li>
9+
<li>a set of checkboxes that doesn't have enough, or has too many boxes checked</li>
10+
<li>a select that doesn't have enough, or has too many options selected</li>
1111
</ul>
1212
<p>Works with text inputs, selects and checkboxes.</p>
1313
</longdesc>

entries/remote-method.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<title>remote method</title>
44
<desc>Requests a resource to check the element for validity.</desc>
55
<longdesc>
6-
The serverside resource is called via jQuery.ajax (XMLHttpRequest) and gets a key/value pair, corresponding to the name of the validated element and its value as a GET parameter. The response is evaluated as JSON and must be <code>true</code> for valid elements, and can be any <code>false</code>, <code>undefined</code> or <code>null</code> for invalid elements, using the default message; or a string, eg. <code>"That name is already taken, try peter123 instead"</code> to display as the error message.
6+
The server-side resource is called via jQuery.ajax (XMLHttpRequest) and gets a key/value pair corresponding to the name of the validated element and its value as a GET parameter. The response is evaluated as JSON and must be <code>true</code> for valid elements, and can be any <code>false</code>, <code>undefined</code> or <code>null</code> for invalid elements, using the default message; or a string, eg. <code>"That name is already taken, try peter123 instead"</code> to display as the error message.
77

88
<p>For more examples, take a look the <a href="http://jquery.bassistance.de/validate/demo/marketo">marketo demo</a> and the <a href="http://jquery.bassistance.de/validate/demo/milk">milk demo</a>.</p>
99
</longdesc>
1010
<signature>
1111
<argument name="options" type="Object">
1212
<desc>
13-
The URL of the resource to request for serverside validation (String) or options to fully customize the request, see <a href="http://api.jquery.com/jQuery.ajax">jQuery.ajax</a> for details.
13+
For the URL of the resource to request for server-side validation (String) or options to fully customize the request, see <a href="http://api.jquery.com/jQuery.ajax">jQuery.ajax</a> for details.
1414
<p>These options deep-extend the defaults (<code>dataType:"json", data:{nameOfTheElement:valueOfTheElement}</code>). Any options you provide will override the defaults.</p>
1515
</desc>
1616
</argument>
@@ -30,7 +30,7 @@ $( "#myform" ).validate({
3030
]]></code>
3131
</example>
3232
<example>
33-
<desc>Makes the email field required, an email and does a remote request to check if the given address is already taken. In addition, the http method is set to "post" and the username is sent along side the email address.</desc>
33+
<desc>Makes the email field required, an email and does a remote request to check if the given address is already taken. In addition, the http method is set to "post" and the username is sent alongside the email address.</desc>
3434
<code><![CDATA[
3535
$( "#myform" ).validate({
3636
rules: {

entries/required-method.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<title>required method</title>
44
<desc>Makes the element required.</desc>
55
<longdesc>
6-
Return false if the element is empty (text input) or unchecked (radio/checkbox) or nothing selected (select).
6+
Return false, if the element is empty (text input) or unchecked (radio/checkbox) or if nothing is selected (select).
77
<p>Works with text inputs, selects, checkboxes and radio buttons.</p>
88
<p>To force a user to select an option from a select box, provide an empty option element like &lt;option value=""&gt;Choose...&lt;/option&gt;</p>
99
</longdesc>

entries/rules.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<title>.rules()</title>
44
<desc>Read, add and remove rules for an element.</desc>
55
<longdesc>
6-
Return the validations rules for the first selected element or
6+
Returns the validations rules for the first selected element or
77

88
<p>Adds the specified rules and returns all rules for the first matched element. Requires that the parent form is validated, that is, $( "form" ).validate() is called first or</p>
99

@@ -32,7 +32,7 @@
3232
<desc>Remove rules</desc>
3333
<argument name='"remove"' type="String"/>
3434
<argument name="rules" type="Object">
35-
<desc>The space-seperated names of rules to remove and return. If left unspecified, removes and return all rules. Manipulates only rules specified via rules-option or via rules("add").</desc>
35+
<desc>The space-seperated names of rules to remove and return. If left unspecified, removes and returns all rules. Manipulates only rules specified via rules-option or via rules("add").</desc>
3636
</argument>
3737
</signature>
3838
<example>

entries/url-method.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p>Works with text inputs.</p>
88
</longdesc>
99
<example>
10-
<desc>Makes "field" required and an url.</desc>
10+
<desc>Makes "field" required and a url.</desc>
1111
<code><![CDATA[
1212
$( "#myform" ).validate({
1313
rules: {

entries/valid.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<signature>
99
</signature>
1010
<example>
11-
<desc>Sets up validation for a form, then checks if the form is when clicking a button valid.</desc>
11+
<desc>Sets up validation for a form, then checks if the form is valid when clicking a button.</desc>
1212
<css><![CDATA[
1313
1414
]]></css>

0 commit comments

Comments
 (0)