Passing error/warning messages from a meta box to “admin_notices”
You can do this by hand, but WP natively does it like this for settings errors: add_settings_error() to create message. Then set_transient(‘settings_errors’, get_settings_errors(), 30); settings_errors() in admin_notices hook to display (will need to hook for non-settings screens).