Contentful App Framework - Prevent publishing when custom app has invalidating

Hi, I have a custom app built using the Contentful App Framework, this app has many input fields that are being checked/validated they have the correct data.

I can see a way to set the field (custom app) to a state of invalid and the entire custom app in the editor has a red line put against it, but I would like to implement that same behaviour as when a Contentful field is consider invalid, which is the publish button also is disabled, which prevents the bad data from being published.

So I was wondering if there is a way when using the Contentful App Framework to disable the publish button?

Cheers,
Shannon