Skip to content

Commit 321b0c0

Browse files
committed
Conflicts: README.md index.html
2 parents 99ea7d3 + 24231ba commit 321b0c0

19 files changed

+2773
-130
lines changed

README.md

100755100644
Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,8 @@ Prompt direction can be define using the field's **data** attribute. Here are a
144144
<input value="http://" class="validate[required,custom[url]] text-input" type="text" name="url" id="url" data-prompt-position="topLeft" />
145145
<input value="" class="validate[required] text-input" type="text" name="req" id="req" data-prompt-position="bottomLeft" />
146146
<input value="too many spaces obviously" class="validate[required,custom[onlyLetterNumber]]" type="text" name="special" id="special" data-prompt-position="bottomRight" />
147-
<input value="" class="validate[required] text-input" type="text" name="req-inline" id="req-inline" data-prompt-position="inline" />
148147
```
149148

150-
If "inline" is applied the prompt is attached after the corresponding input field with position set to "relative". You can specify an optional target container to which the prompt should be attached by providing the id of this container in the field's **data-prompt-target** attribute.
151-
152149
### Prompt Position Adjustment
153150

154151
Prompt position can be adjusted by providing shiftX and shiftY with position type in the field's **data** attribute.
@@ -211,26 +208,6 @@ All calls to validationEngine() are chainable, so one can do the following:
211208
$("#formID").validationEngine().css({border : "2px solid #000"});
212209
```
213210

214-
### Suppress Validation Feature
215-
216-
Hyperlink and Button ( <button> and input ) allow suppress the validation for special case such as multi fake submit buttons in web page.
217-
An id attribute for the HTML element is required.
218-
219-
Syntax (HTML5):
220-
```html
221-
<input id="skipbutton" data-validation-engine-skip="true" type="submit" value="Refresh button"/>
222-
```
223-
Syntax (use class attribute):
224-
```html
225-
<input id="skipbutton" class="submit validate-skip" type="button" value="Refresh button"/>
226-
```
227-
228-
### Using a DIV container instead of a FORM
229-
230-
You can use a div acting as a container using the class *"validationEngineContainer"*. Please be aware that events like submit() won't work and you will have to call the action 'validate' to validate the form.
231-
232-
233-
234211
Actions
235212
---
236213

@@ -244,7 +221,7 @@ $("#formID1").validationEngine('attach');
244221

245222
### detach
246223

247-
Unregisters any bindings that may point to jQuery.validationEngine.
224+
Unregisters any bindings that may point to jQuery.validaitonEngine.
248225

249226
```js
250227
$("#formID1").validationEngine('detach');
@@ -274,7 +251,7 @@ Displays a prompt on a given element. Note that the prompt can be displayed on a
274251
The method takes four parameters:
275252
1. the text of the prompt itself
276253
2. a type which defines the visual look of the prompt: 'pass' (green), 'load' (black) anything else (red)
277-
3. an optional position: either "topLeft", "topRight", "bottomLeft", "centerRight", "bottomRight", "inline". Defaults to *"topRight"*
254+
3. an optional position: either "topLeft", "topRight", "bottomLeft", "centerRight", "bottomRight". Defaults to *"topRight"*
278255
4. an optional boolean which indicates if the prompt should display a directional arrow
279256

280257
```html
@@ -336,24 +313,16 @@ Name of the event triggering field validation, defaults to *blur*.
336313
### scroll
337314
Determines if we should scroll the page to the first error, defaults to *true*.
338315

339-
### scrollOffset
340-
The amount to offset the scroll in px. Useful if there are fixed elements at the top of the page.
341-
342316
### binded
343-
If set false, does not attach blur events and only validates on the form submit.
317+
If set to true, it remove blur events and only validate on submit.
344318

345319
### promptPosition
346-
Where should the prompt show? Possible values are "topLeft", "topRight", "bottomLeft", "centerRight", "bottomRight", "inline". Defaults to *"topRight"*. Default position adjustment could also be provided.
347-
"topLeft" to "bottomRight" are absolutely positioned.
348-
If "inline" is applied the prompt is attached after the corresponding input field with position set to "relative". By adding an optional "data-prompt-target" attribute to the field you can specify the id of an element to which the prompt should be appended alternatively. (see "Per Field Prompt Direction" for more details)
320+
Where should the prompt show? Possible values are "topLeft", "topRight", "bottomLeft", "centerRight", "bottomRight". Defaults to *"topRight"*.
321+
Default position adjustment could also be provided.
349322

350323
### showOneMessage
351324
Only display the first incorrect validation message instead of normally stacking it. It will follows the validation hierarchy you used in the input and only show the first error.
352325

353-
### showPrompts
354-
If set to false, prompts never show.
355-
356-
357326
### ajaxFormValidation
358327
If set to true, turns Ajax form validation logic on. Defaults to *false*.
359328
Form validation takes place when the validate() action is called or when the form is submitted.
@@ -445,10 +414,6 @@ Determines if the prompt should hide itself automatically after a set period. De
445414
### autoHideDelay
446415
Sets the number of ms that the prompt should appear for if autoHidePrompt is set to *true*. Defaults to *10000*.
447416
448-
### addPromptClass
449-
Add a css class to the created prompt on each field (Useful for modals and stuff).
450-
451-
452417
Validators
453418
---
454419
@@ -501,7 +466,7 @@ Please refer to the section *Custom Regex* for a list of available regular expre
501466
502467
### custom[function_name]
503468
504-
Validates the element's value to a predefined function included in the language file (compared to funcCall that can be anywhere in your application),
469+
Validates the element's value to a predefined function included in the language file (compared to funCall that can be anywhere in your application),
505470
506471
```html
507472
<input value="someone@nowhere.com" class="validate[required,custom[requiredInFunction]]" type="text" name="email" id="email" />
@@ -871,14 +836,9 @@ This need to be added before the initialization, one good way to handle this wou
871836
<script src="js/jquery.validationEngine-settings.js" type="text/javascript" charset="utf-8"></script>
872837
```
873838
874-
Using the validationEngine with modal & dialog plugins & kendo UI widgets
839+
Using the validationEngine with modal & dialog plugins
875840
---
876-
Modal elements, have a tendency to take a high z-index, which in turn can interfer with the plugin. In the case of modal jQuery ui, if you want to change the z-index you can do this easily in your css.
877-
878-
.ui-dialog .formError
879-
880-
881-
For other cases please modify the css yourself, we will not support custom frameworks in the base code. You can have more information about implementing the engine with modal views here:
841+
You can have more information about implementing the engine with modal views here:
882842
[http://www.position-absolute.com/articles/using-the-jquery-validation-engine-with-modal-plugins/]
883843
884844
@@ -952,10 +912,5 @@ Authors
952912
---
953913
954914
Copyright(c) 2011 [Cedric Dugas](https://github.com/posabsolute) [http://www.position-absolute.com](http://www.position-absolute.com)
955-
[![endorse](http://api.coderwall.com/posabsolute/endorsecount.png)](http://coderwall.com/posabsolute)
956-
957-
v2.0 Rewrite by [Olivier Refalo](https://github.com/orefalo) [http://www.crionics.com](http://www.crionics.com)
958915
959-
**Official Contributors**
960-
961-
Stefan Fochler
916+
v2.0 Rewrite by [Olivier Refalo](https://github.com/orefalo) [http://www.crionics.com](http://www.crionics.com)

0 commit comments

Comments
 (0)