JQuery plug-in Form-Validation-Engine Regular Expression Operation Example

This example tells the JQuery plug-in Form-Validation-Engine regular expression operation. Share to everyone for your reference, specifically the following:

Form-value-engine is a nice form verification plugin, example below:

  (FUNCTION) $) {$ .fn.validationEngineLanguage = function () {}; $ .validationEngineLanguage = {newLang: function () {$ .validationEngineLanguage.allRules = { "required": {// Add your regex rules here, you can take telephone AS An Example "Regex": "None", "AlertText": "AlertTextCheckBoxMultiple": "* Please select Options", "AlertTextCheckboxe": "* Require this check box"}, "length" : {"regex": "None", "AlertText": "*", "AlertText2": "and" "AlertText3": "Between"}, "maxckbox": {"regex": "none", "AlertText": "* Check Allow more"}, "mincheckbox": {"regex": "none", "alerttext": "* Please select", "AlertteXT2 ":" option "}," confirm ": {" regex ":" none "," AlertText ":" * Your field does not match "}," telephone ": {" regex ":" / ^ [0- 9 \ - \ (\) \] + $ / "," AlertText ":" * Invalid Number "}," email ": {" regex ":" / ^ [A-ZA-Z0-9 _ \. \ ] + \ @ ([A-ZA-Z0-9 \ -] + \.) + [A-ZA-Z0-9] {2,4} $ / "," AlertText ":" * Invalid Mailbox "} , "date": {"regex": "/ ^ [0-9] {4} \ - \ [0-9] {1, 2} \ - \ [0-9] {1, 2} $ /" "AlertText": "* Invalid date, must be the format of YYYY-MM-DD"}, "online": {"regex": "/ ^ [0-9 \] + $ /", "alertText": "*" Only allows input numbers "}," Nospecialcaracters ": {" regex ":" / ^ [0-9A-ZA-Z] + $ / "," AlertText ":" * Have illegal characters "}," ajaxuser " : {"File": "ValidateUser.php", "EXTRADATA": "Name = Eric", "AlertTextok": "* This user is legal", "AlertTextLoad": "* Load, please wait", "AlertText ":" * This user already exists "}," ajaxname ": {" file ":" ValidateUser.php "," alertText ":" * The name has been used "," alertTextOk ":" * The name is possible "," alertTextLoad ":" * Loading, please wait "}," onlyLetter ": { "regex": "/ ^ [a-zA-Z \ \ '] + $ /", "alertText": "* only enter the letter"}, "validate2fields": { "nname": "validate2fields", "alertText ":" * you must have first and last name "}}}}}) (jQuery); $ (document) .ready (function () {$ .validationEngineLanguage.newLang ()});  

there are a lot of regular expressions, very interesting.

jQuery插件form-validation-engine正则表达式操作示例

interesting form validation form.

PS: here again we provide 2 models very handy regular expression tools for reference use:

JavaScript regular expression online testing tool:
http: / /tools.jb51.net/regex/javascript

online tool generates a regular expression:
http://tools.jb51.net/regex/create_reg

more about jQuery which can be viewed site topic: “jQuery regular expression summary”, “jQuery string manipulation skills summary”, “jQuery operation xml skills summary”, “jQuery total extension techniques”JQuery Selector Summary” and “JQuery Common Plugin and Usage Summary”

I hope this article will help you jQuery program.

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment