Jquery Ajax:无法显示多种形式的特定表单更改

I have multiple forms in a single page. Each form is submitted and updated separately through jquery and ajax. However, I cannot show individual form changes for all forms.

I'm using this plugin for submitting the forms, however, the problem remains even when submitting the form with default jquery code.

Here are the forms-

<form action="add_product.php" method="post" class="add_product_form">
<input type="text" name="product_name" class="form-control">
<input type="text" name="product_details" class="form-control">
<input type="submit" value="submit">
</form>

<form action="add_order.php" method="post" class="add_order_form">
<input type="text" name="order_name" class="form-control">
<input type="text" name="order_details" class="form-control">
<input type="submit" value="submit">
</form>

Here are jquery codes

// Submitting the first form

$('.add_product_form').ajaxForm({
        success: function() {
            $('.add_product_form *').filter(':input').each(function(){
                $(this).removeClass('is-invalid');
            });  
        },
        complete: function(xhr) {
            data = JSON.parse(xhr.responseText);
            if(data.status == 'error'){
                $.each(data.messages, function( index, value ) {
                    $(".add_product_form input[name="+index+"]").addClass('is-invalid');
                }); 
            }
            else {
                          alert('okay');
                        }
        }
    }); 

// Submitting the second form

$('.add_order_form').ajaxForm({
        success: function() {
            $('.add_order_form *').filter(':input').each(function(){
                $(this).removeClass('is-invalid');
            });  
        },
        complete: function(xhr) {
            data = JSON.parse(xhr.responseText);
            if(data.status == 'error'){
                $.each(data.messages, function( index, value ) {
                    $(".add_order_form input[name="+index+"]").addClass('is-invalid');
                }); 
            }
            else {
                           alert('okay');
                       }
        }
    });

The first form shows the changes properly, the second form does not. Any changes outside the second form such as the alert works properly, however.