Woocommerce checkout trigger validation of all fie

2019-08-06 15:21发布

问题:

I am trying to trigger validation for the whole checkout form in woocommerce and do something based on having validation errors or not.

Unfortunately I didn't manage to do it. Anyone has any ideas?

EDIT: To be more specific, on submitting the woocommerce checkout form. I want to check if all the shipping fields are valid, but prevent submitting the form because I want to process that form data further (but only if it's valid).