Jquery Validation Plugin,获取错误字符串

时间:2011-01-20 15:32:20

标签: jquery string validation

我想只获取错误消息字符串

('#frmEcard').validate({
        onkeyup: false,
        onfocusout: false,
        onsubmit: false,
        ignoreTitle: true,
        rules: {
            'txt_sendto': "multiEmails",
            'txt_subject': {
                maxlength: 255
            },
            'txt_message': {
                maxlength: 500
            }
        },

        errorPlacement: function(error, element) {
            $.jGrowl(HERE , {
                sticky:   true,
                life:    12000                    
            });
        }
    });

1 个答案:

答案 0 :(得分:5)

你走了。

errorPlacement: function(error, element) {
            $.jGrowl($(error).text(), {
                sticky:   true,
                life:    12000                    
            });
        }