How can I make an admin_setting_* field require a value?

I have a few admin settings that require an admin to enter a value. Is there a flag on the admin_setting subclasses that would make sure the field is not empty? I would hate to have to subclass each type just to enforce this requirement.

Be also careful with that check and make sure it does not prevent module from being installed. During module installation Moodle will detect and offer settings for a user to set of a new module. If there are no defaults and user does not enter anything Moodle will not stop showing them until some resonable value is entered by the user. This also screws CLI installations/upgrades.

I think a more feasible option is to just have your plugin display a polite error message if it is not set up properly.

Think about this scenario: an admin installs your plugin into their Moodle, but does not currently know where the other server will be. They have to be able to click 'Save changes' on the 'Update settings' page to complete the install, so the only viable option is for them to leave that setting blank for now, and fill it in later.