Something which I have never seen covered is the best way to validate that specific form fields are filled out correctly for custom post type meta boxes.
I am looking to get expert opinions on how best to validate custom fields for any metaboxes that one might create. My interest are to:
- ensure field validation takes place before the post is published/updated
- utilizing a class/code which does not conflict with other wordpress javascript
- allows you to define specific fields as required while others could be optional
- validate fields based on customizable rules including regex for things like email format
- control the visual display of any errors/notices
Thanks in advance!