Plug-in home page: http://www.yhuan.com/help posts, each post Bing
QQ chat group: 74106519
2011/4/30 jquery formvalidator 4.0ver
In this upgrade, I would like to thank many netizens who keep posting messages on the blog, especially the netizen "mark35" for answering questions from netizens on the blog. I would like to thank you again.
1. This upgrade is simplified.Code.
2. Improve the verification speed.
If the control name is the same, only one verification is performed to speed up the verification.
3. fixed the problem where no prompts were hidden when four states were empty.
4. Modify the onerror function in initconfig and add an "Error List" parameter. You can set all error messages are displayed somewhere
$. formvalidator. initconfig ({formid: "form1",
onerror: function (MSG, OBJ, errorlist) {
// traverses all error messages
$. map (errorlist, function (msg1) {alert (msg1)});
},
onsuccess: function () {alert ('ddd '); return false ;}< BR >});
5. Modify the ajaxvalidator function that has many problems as follows:
A. All form values in the same group can be passed to the server.
The name attribute must be added for each control. Otherwise, the attribute will not be passed.
B. Remove the addidvalue parameter. On the server side, you can obtain the ID of the control that triggers verification using clientid.
C. Add Ajax parameters for formvalidator (values: True, false, default: True) to indicate whether ajaxvalidator submits the form to the server.
6. fixed the problem that the automodify parameter (if the input value is invalid, the original value is restored) does not work.
7. regexvalidator supports multiple regular expressions and/or verifications. For details, see the user manual and demo1.
A. Add a property: comparetype, comparison type. The default value is "|", "|", indicating the or relationship. "&" indicates the parallel relationship.
B. The original Regexp attribute supports receiving arrays.
Example:
$ ("# Sjdh "). formvalidator ({empty: True, onshow: "Enter your mobile phone number or phone number. It can be blank.", onfocus: "Format: 0577-88888888 or 11-digit mobile phone number ", oncorrect: "Thank you for your cooperation", onempty: "Do you really want to leave a cell phone or phone number? "}). Regexvalidator ({Regexp: ["tel", "mobile"], datatype: "Enum", onerror: "Your entered mobile phone or phone format is incorrect "});
8. added the function $. formvalidator. reloadautotip () to reposition the automatically constructed prompt layer.
If the page on which the Automatic Build prompt layer is located is hidden in IFRAME and displayed at the beginning, the page is all in the upper left corner. Therefore, when the page is displayed, you must call this function explicitly.
Official explanation of offset:
Note: jquery does not support getting the offset coordinates of hidden elements or accounting for borders, margins, or padding set on the Body element.
You are welcome to give valuable suggestions, and you are welcome to test
You can join the QQ group to get up and talk: 74106519