title: Throw an error message using Ajax when user fills checkout form
body: <p>I am developing a Woocommerce shop. I have minimum order amount for ordering for specific postcodes.
  How to display error message when the user fills checkout form, particularly the post code field, when he typed postcode then show him a error message that the minimum order amount is not reached for his postcode.
  Currently, I am having this messages to throw when the user click place order button at last.</p>
  <p>Based on <a href="https://stackoverflow.com/questions/55038477/set-a-minimum-order-amount-in-woocommerce/55040834#55040834">Set a minimum order amount in WooCommerce</a> answer, that is my code:</p>
  <pre><code>add_action( 'woocommerce_checkout_process' , 'required_min_cart_subtotal_amount');
  
  // Only run in the Cart or Checkout pages
  function required_min_cart_subtotal_amount() {
      
      if( is_checkout()) {
          global $woocommerce;
  
          // Set the minimum order amount and shipping zone before checking out
          $county1    = array(69214);
                  
          // Defining var total amount      
          $cart_tot_order = WC()-&gt;cart-&gt;total;
          
          if( $cart_tot_order &lt; 8 &amp;&amp; in_array( WC()-&gt;customer-&gt;get_shipping_postcode(), $county1 )  ) {
              // Display error message
               wc_add_notice( sprintf( '&lt;strong&gt;Eine Mindestbestellmenge von $% s ist erforderlich, um an Ihre Adresse zu liefern.&lt;/strong&gt;' 
                  . '&lt;br /&gt;Aktueller Auftrag: $%s.',
                  8,
                  $cart_tot_order ),
              'error' );
              
          }}
  </code></pre>