[AS3]jquery.validate重写错误显示消息方法,以alert方式弹出错误
[AS3]jquery.validate提示错误方法,[AS3]jquery.validate重写错误显示消息方法,以alert方式弹出错误消息
[AS3]jquery.validate提示错误方法
- $.validator.setDefaults({
- submitHandler: function() { alert("submitted!");return false; }
- });
- $().ready(function() {
- // validate signup form on keyup and submit
- $("#reg_form").validate({
- rules: {
- /* input nameCuPlayer.com 有 . 时加上引号 */
- 'mem.username': {
- required: true,
- minlength: 5
- },
- 'mem.password': {
- required: true,
- minlength: 5
- }
- },
- messages: {
- 'mem.username': {
- required: "Please provide a password",
- minlength: "Your password must be at least 5 characters long"
- },
- 'mem.password': {
- required: "Please provide a password2",
- minlength: "Your password must be at least 5 characters long"
- }
- },
- /* 重写错误显示消息方法,以alert方式弹出错误消息 */
- showErrors: function(errorMap, errorList) {
- var msg = "";
- $.each( errorList, function(i,v){
- msg += (v.message+"\r\n");
- });
- if(msg!="") alert(msg);
- },
- /* CuPlayer.com提示失去焦点时不验证 */
- onfocusout: false
- });
- });
[AS3]jquery.validate提示错误方法
热门文章推荐
- [HLS]做自己的m3u8点播系统使用HTTP Live Streaming(HLS技术)
- [FMS]FMS流媒体服务器配置与使用相关的介绍
- [AS3]什么是M3U8,与HTML5的区别是什么
- AS2.0 让flash自适应全屏,并且不自动缩放
- [AS3]as3.0的sound类常用技巧整理
- [AS3]as3与ByteArray详解、ByteArray介绍、ByteArray用法
- 关于RTMP,RTMPT,RTMPS,RTMPE,RTMPTE协议的介绍
- [JS]分享浏览器弹出窗口不被拦截JS示例
请稍候...