Adding password validation with jQuery validation with different cases
<p>I managed to create a jQuery validation for a password field this far. My question is how I edit this to get an error alert in each custom case like 'You need to add a Capital Letter', 'You need to add a number' etc.
My Code:</p>

<pre><code>var value=$("#password_reg").val();

$.validator.addMethod("pwcheck",function(value) {
     return /^[A-Za-z0-9\d=!\-@._*]*$/.test(value) &amp;&amp; /[a-z]/.test(value) &amp;&amp; /\d/.test(value) &amp;&amp; /[A-Z]/.test(value);
});

$('#signup-form').validate({    
    rules: {
        password:{
            minlength: 6,
            maxlength: 30,
            required: true,
            pwcheck: true   
        },
        confirmPassword:{
            equalTo: "#password_reg",
        },
    },
    messages: {
       password: {
           pwcheck: "Password is not strong enough"
       }     
    },
    highlight: function(element) {
        var id_attr = "#" + $( element ).attr("id") + "1";
        $(element).closest('.form-group').removeClass('has-success').addClass('has-error');
        $(id_attr).removeClass('glyphicon-ok').addClass('glyphicon-remove');  
        $('.form-group').css('margin-bottom', '5px');
        $('.form').css('padding', '30px 40px');
        $('.tab-group').css('margin', '0 0 25px 0');
        $('.help-block').css('display', '');
    },
    unhighlight: function(element) {
        var id_attr = "#" + $( element ).attr("id") + "1";
        $(element).closest('.form-group').removeClass('has-error').addClass('has-success');
        $(id_attr).removeClass('glyphicon-remove').addClass('glyphicon-ok');         
    },
    errorElement: 'span',
        errorClass: 'validate_cus',
        errorPlacement: function(error, element) {
            x=element.length;
            if(element.length) {
                error.insertAfter(element);
            } else {
            error.insertAfter(element);
            }
        }
 });
</code></pre>

<p>Please check my <a href="https://jsfiddle.net/creativeRosh/80naet3b/" rel="nofollow">fiddle</a> </p>