How to make topic's custom_fields must present

nice!
so how to validate the custom field input and reject attempts to Post a new Topic until those requirements are met in location plugin. Can you share your ideas and codes? is it complex?