Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Validation Plugin, get string of errors

i want to get only the errror messages string,

('#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                    
            });
        }
    });
like image 738
Gabriel Avatar asked Jan 20 '11 15:01

Gabriel


1 Answers

Here you go.

errorPlacement: function(error, element) {
            $.jGrowl($(error).text(), {
                sticky:   true,
                life:    12000                    
            });
        }
like image 82
missaghi Avatar answered Sep 25 '22 21:09

missaghi