@@ -126,15 +126,15 @@ The validation function takes these five arguments:
126
126
127
127
## Creating a custom module
128
128
129
- A "module" is basically a script file containing one or more calls to [ $.formUtils.addValidator()] ( #writing-a-custom-validator ) . The module file
130
- should either have the extension * .js* (as an ordinary javascript file) or * .dev.js* .
129
+ A "module" is basically a javascript file containing one or more calls to [ $.formUtils.addValidator()] ( #writing-a-custom-validator ) . The module file
130
+ should either have the file extension * .js* (as an ordinary javascript file) or * .dev.js* .
131
131
132
- Using the extension ** .dev.js** will make the module loading function to always append a timestamp to the end of the
132
+ Using the file extension ** .dev.js** will tell * $.formUtils.loadModules * to always append a timestamp to the end of the
133
133
URL, so that the browser never caches the file. You should of course never use * .dev.js* on a production website.
134
134
135
135
### Loading your module ###
136
136
137
- ```
137
+ ``` html
138
138
<html >
139
139
<head >
140
140
<script src =" js/formvalidator/jquery.formvalidator.min.js" ></script >
@@ -147,7 +147,7 @@ URL, so that the browser never caches the file. You should of course never use *
147
147
```
148
148
149
149
The first argument of $.formUtils.loadModules is a comma separated string with names of module files, without
150
- extension (add .dev if the file name is for example mymodule.dev.js, this will insure that the browser never
150
+ file extension (add .dev if the file name is for example mymodule.dev.js, this will insure that the browser never
151
151
caches the javascript).
152
152
153
153
The second argument is the path where the module files is located. This argument is optional, if not given
@@ -166,7 +166,6 @@ It is possible to show that the value of an input is incorrect immediately when
166
166
</p >
167
167
...
168
168
</form >
169
-
170
169
<script >
171
170
$ (' #my_form' ).validateOnBlur ();
172
171
</script >
@@ -178,12 +177,11 @@ It is possible to display help information for each input. The information will
178
177
``` html
179
178
<form action =" " onsubmit =" return $(this).validate();" id =" my_form" >
180
179
<p >
181
- <strong >Why not: </strong >
182
- <textarea name = " why " data-help =" Please give us some more information" data-validation =" required" ></textarea >
180
+ <strong >Why not? </strong >
181
+ <textarea data-help =" Please give us some more information" data-validation =" required" ></textarea >
183
182
</p >
184
183
...
185
184
</form >
186
-
187
185
<script >
188
186
$ (' #my_form' ).showHelpOnFocus ();
189
187
</script >
0 commit comments