Custom data validation in WordPress is something that many who have built custom solutions for others have likely used.
In fact, anyone who has made a theme or a plugin has probably used some form of data validation even if it’s just escaping some attribute that will be part of the rendered markup.
This is a major step in making sure that anything you’re creating is securely managing information coming from the database.
But whenever you’re working on a custom solution that requires you use various elements and attributes, how can you specify only the supported attributes?