Validation fields
$ (' #info_form '). Validator ({
Rules: {
Checkmobile:function (ele) {
Return Checkmobile (ele);
},
' Tel ': [/0\d{2,3}-\d{7,8} (| ( [-\U8F6C] {1}\d{1,5})) $/, "Please fill in a valid phone number"],
},
Fields: {
' #agentName ': {
Rule: ' Required; ',
Msg: {required: ' Please enter name '}
},
' #email ': {
Rule: ' Email ',
Msg: {required: ' Please enter e-mail '}
},
' #qq ': {
Rule: ' length[5~11] ',
Msg: {required: ' Please enter QQ ', Length: ' Please enter a valid QQ '}
},
' #tel ': {
Rule: ' Tel ',
}
},
Valid:function (form) {
Event-Submit
G_http.ajaxbypostsyncwithlogin ('/webagent/update ', $ (' #info_form '). Serialize (), "JSON", function (data) {
if (Data.status = = 0) {
Save prompt
Layerutil.success ("Modified successfully! ");
}
});
}
});
Domestic fixed-line verification: ' Tel ': [/0\d{2,3}-\d{7,8} (| ( [-\U8F6C] {1}\d{1,5})) $/, "Please fill in a valid phone number"],