Woocommerce edit checkout form errors

enter image description here

By default woocommerce display all the required fields notices like above.

Read More

What i needed
I want to make it as single-line validation messages like

Please fill the details with has highlighted in Red border

enter image description here

I already achieved redborder through css with “woocommerce-invalidate” class. I just need a hook / filter to alter my group of message with single line.

Related posts

1 comment

  1. for this you can use jQuery validation. You can call jquery valiation library And there will be you call jquery function.

    like this

     $(document).ready(function(){
          $("#wocoomerceformid").validate({
            rules:{fieldname:"required"}
            messages: {fieldname: "custom message."}
        });
     });
    

    Now you can hide message and when you click submit button there will be one class add in same input box. message display none via css and take class that are added in input name error.

    just do it is very simple.

Comments are closed.