I want to enable the button when validation is false, actually i am new to this jquery validator plugin , this is the code that i am using
<button class="btn" onclick="save_data_A()" id="per-btn">
    Next  <i class="fas fa-arrow-right"></i>
</button>
function save_data_A() {
    $("#per-btn").addClass("disabled");
    var fileInput = document.getElementById('file');
    var file = fileInput.files[0];
    $("#frmdata_A").validate({
        rules: {
            val_phone: {
                required: true,
                minlength: 10,
                number: true,
                maxlength: 10
            },
            file: "required",
        },
        messages: {
            val_phone: "Enter valid Phone no",
            file: "Upload an image",
        },
        submitHandler: function(form) {
            alert('hai');
        }
    });
}