Inline form validation engine error scroll to top

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confindential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Directory (?) [-] Options parameter Description Optional Use method load CSS file load JavaScript file add ID to form plus ID to control and set validation type set validation validation type API method validationengine Chinese version jquery Powerful form verification plug-in a simple description of the use of the tutorial to introduce jquery and Plug-ins JSCSS initialization plug-in You can also click the Submit button before triggering validation the default is to start validation after the mouse loses focus, which is bound to the Blur event. See the following configuration to change the location of the hint layer Ajax validation Mode

http://blog.csdn.net/andyliulin/

Precautions:

1. Demo version is v2.2.4;

2.v2.0 The following version parameters are not fully generic;

Modify the validationEngine.jquery.css file as follows:

1. Prompts the content font to change the song body;

2. Remove the private properties of each browser (each browser already supports rounded corners and shadows and no longer need to add private properties).

Modify the jquery.validationEngine.js file as follows:

1. Field.focus () of 312 lines; Comment out, when there is an input control inside the Table, validation causes the phenomenon to return to the top;

Modify the jquery.validationengine-zh_cn.js file as follows:

1. Modify some of the hint text;

2. Increase the validation rules for the two pairs of Chinese characters: MINSIZECN and MAXSIZECN;

3. Remove "Validate2fields": {"Alerttext": "* Please enter HELLO"},

Merge the above two JS files

View Demo

Modified version: JQuery Validation Engine v2.2.4 Chinese version

Original: JQuery Validation Engine v2.2.4 "Options parameter description" (optional)

name Default Value Description Validationeventtrigger "Blur" Events that trigger validation, and support events refer to the description of the JQuery event.

PS: You can set to NULL if you want to validate only when the form is submitted.

Scroll True The screen scrolls automatically to where the first validation is not passed Focusfirstfield True Whether to get focus on the first failed control when validation fails Promptposition "TopRight" Verify the location of the hint information, can be set to: "TopRight", "Bottomleft", "Centerright", "BottomRight" Autopositionupdate False Whether to automatically adjust the position of the hint layer Bindmethod "Bind" Verify how the event is bound, and can be set to: Bind, Live

PS: Set Live It seems that the binding event is invalid, but the form submission can be validated and recommended not modified. [Demo]

binded False Whether other events have been bound, set to true will not be validated. Inlineajax False Ajaxformvalidation False Validating forms with Ajax Ajaxformvalidationurl False Set the URL for Ajax validation by default using the Action property of form Ajaxvalidcache {} Onajaxformcomplete $.noop form submission, Ajax validation completed behavior (Function) [Demo] Onbeforeajaxformvalidation $.noop After the form submission validation rule is passed, Ajax validates the behavior (Function) [Demo] Onvalidationcomplete False Behavior of form submission validation when completed (Function)

Two parameters can be obtained: form element and validation result (ture or false) [Demo]

Onsuccess False Real-time validation of what happens when all projects are passed (Function) [Demo] OnFailure False Real-time validation of the behavior (Function) that occurs when there are failed projects [Demo]

Ps:onsuccess and onfailure are not valid when real-time authentication is disabled. For example, Validationeventtrigger is set to NULL, or Bindmethod is set to live

Isoverflown False Whether the form is inside an overflow-scrolling element (that is, the external element is set Overflow:scroll)

PS: When set to ture, the insertion position of the prompt content is changed to insert before the validated control;

At this point, you need to set an element in the outer layer of the control, setting the class= "Inputcontainer"

Overflowndiv "" An overflow-scrolling element is set, in the form of a jQuery selector. Showarrow True IsError False Invalidfields []

"Use Method" Load CSS file

Loading JavaScript files

Jquery.validationengine-zh_cn.js The file is a hint text and a custom validation rule, and the modified version has merged the two files, just load the jquery.validationEngine.js; in addition, the jquery plugin will certainly need to be loaded into the jquery library, with the version in jquery 1.4.4 above. >

add an ID to a form

...
ID must be set in the form label, otherwise invalid>

adding IDs to controls and setting validation types