jQuery shortening validation code
<p>this is not so much a problem as just asking for advice, im busy studying JavaScript and jQuey, But im sure there's a way to shorten this:</p>

<pre><code>//Validate General
    $(document).on('blur keyup', 'input.main_name', function(e) {
        if ($(this).val().length == 0) {
            console.log('no main name');
        }
    });

    $(document).on('blur keyup', 'input.main_surname', function(e) {
        if ($(this).val().length == 0) {
            console.log('no main surname');
        }
    });

    $(document).on('blur keyup', 'input.main_town', function(e) {
        if ($(this).val().length == 0) {
            console.log('no  main town');
        }
    });

    $(document).on('blur keyup', 'input.main_email', function(e) {
        if ($(this).val().length == 0) {
            console.log('no  main email');
        }
    });

    $(document).on('blur keyup', 'input.main_postaladdress', function(e) {
        if ($(this).val().length == 0) {
            console.log('no  main postal');
        }
    });

    $(document).on('blur keyup', 'input.main_residential', function(e) {
        if ($(this).val().length == 0) {
            console.log('no  main resi');
        }
    });

    $(document).on('blur keyup', 'input.name', function(e) {
        if ($(this).val().length == 0) {
            console.log('no name');
        }
    });

    $(document).on('blur keyup', 'input.surname', function(e) {
        if ($(this).val().length == 0) {
            console.log('no surname');
        }
    });
    $(document).on('blur keyup', 'input.town', function(e) {
        if ($(this).val().length == 0) {
            console.log('no town');
        }
    });
    $(document).on('blur keyup', 'input.email', function(e) {
        if ($(this).val().length == 0) {
            console.log('no email');
        }
    });
//Validate General
</code></pre>

<p>I just feel stupid copy and pasting, surely its not needed, the only reason, i didit this way is for unique error messages for each input...</p>

<p>Please can someone just educate me on this..
Thanks :)..</p>
