In our system, entries are created from the Control Panel, and one of our custom entries needs more complicated validation rules.
Basically, depending on the status of the submitted entry, we need to determine whether other fields are required, validate the submission based on that and then show errors as per normal validation rules.
I've looked into getting access to the data from the
entry_submission_ready hook and setting the errors via
ee()->form_validation->_error_array['foo'] = 'bar', but this hook is called after validation has already completed and passed.
Ideally I would prefer not having to rewrite any core code, though I am willing to override
Content_publish if this can be done cleanly from a module/extension.