Clientoptions attribute Detailed

Source: Internet
Author: User

An array of options passed to the JavaScript validation plug-in. The following options are currently supported: Ajaxvar:string, which indicates that the current request is the name of an AJAX-requested parameter. When Ajax validation is triggered, a parameter with the name of this attribute is submitted to the server along with other form data. The value of this argument is the ID of the form. The server side can detect the trigger of AJAX validation and react accordingly. The default value is "Ajax." validationurl:string, the URL used to perform AJAX validation. If there is no setting, the value of the action is used. Validationdelay:integer, the number of times the input has been changed before Ajax validation is performed, in milliseconds. A setting of 0 means that an AJAX validation is performed immediately after the input is changed. A value set to greater than 0 means that multiple input changes may trigger only one AJAX validation, as long as they occur quickly enough. This approach can help reduce server load. The default value is 200 (0.2 seconds). Validateonsubmit:boolean whether to perform AJAX validation when the form is submitted. If any validation errors exist, the form's submit action is stopped. The default value is False. Validateonchange:boolean, whether each input value is changed triggers an AJAX validation. Because every time an AJAX validation request submits the entire form's data, it can cause too much impact on performance, and you may choose to turn this option off. The default value is true. Validateontype:boolean, whether the user's every key action will trigger an AJAX validation. If this property is set to True, you should increase the value of "validationdelay" to avoid triggering too many Ajax validations. The default value is False. Hideerrormessage:boolean whether to hide the error message when there is an error. The default value is False, which indicates that an error message is displayed regardless of whether an input error exists. Inputcontainer:string, the jquery selector that contains the HTML element of the input box. During the validation process, cactiveform specifies the corresponding CSS class for the containing element to indicate a change. If not set, the default is the nearest "div" element that contains the input box. Errorcssclass:string, a CSS class specified for an HTML container that contains an input box with an AJAX validation error. The default value is "error". Successcssclass:string, for inclusion through the AJAX validation successThe HTML container for the input box specifies the CSS class. The default value is "Success". Validatingcssclass:string, the CSS class specified for the HTML container that contains the input boxes that are being validated by Ajax. The default value is "validating". Errormessagecssclass:string, the CSS class specified for the error message returned by AJAX validation. The default value is "ErrorMessage". Beforevalidate:function a function that is called before an AJAX-based validation execution triggered by a form submission action (available only if the Validateonsubmit is set to true). The expected function signature is shaped like beforevalidate (form) {...}, where "form" is the jquery representation of the form object. If the return value of this function is not true, the validation will be canceled.   NOTE: Because this option points to a JavaScript function, you should add a "JS:" prefix to avoid it being encoded as a string. This option is supported starting with version 1.1.3. Aftervalidate:function a function that is called after an AJAX-based validation execution triggered by a form submission action (available only if the Validateonsubmit is set to true). The expected function signature form is aftervalidate (form, data, Haserror) {...}, where "form" is the jquery representation of the form object; "Data" is the JSON format of the server-side validation response; "Haserror" is a Boolean value that indicates whether there are any validation errors. If the return value of this function is not true, the corresponding form submission will be canceled.     NOTE: Because this option points to a JavaScript function, you should add a "JS:" prefix to avoid it being encoded as a string. This option is supported starting with version 1.1.3. Beforevalidateattribute:function, when an individual property's input box changes, the AJAX that triggers the validation executes the function that was called before. Expected function signature such as   Beforevalidateattribute (form, attribute) {...}, where "form" is the jquery representation of the form object; "Attribute" The JS option that points to the triggered property (see error). If this letterThe return value for the number is not true and validation will be canceled.     NOTE: Because this option points to a JavaScript function, you should add a "JS:" prefix to avoid it being encoded as a string. This option is supported starting with version 1.1.3. Aftervalidateattribute:function, when an individual property's input box changes, the AJAX that triggers the validation of the function that is invoked after the execution. Expected function signatures such as   aftervalidateattribute (form, attribute, data, Haserror) {...}, where "form" is the jquery representation of the form object; "Attribute" points to the JS option of the triggered property (see error); "Data" is the JSON-formatted data of the server-side validation response; "Haserror" is a Boolean value indicating whether any validation errors exist.     NOTE: Because this option points to a JavaScript function, you should add a "JS:" prefix to avoid it being encoded as a string. This option is supported starting with version 1.1.3.

Please respect the original, this article also spent a lot of thoughts, forwarding please specify the source @ Let us work together ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.