Validate add media form – Drupal Answers

I’m on Drupal 8. I have created a new media bundle for myself called permissions_json, resting at http://dev-portal.local:9001/media/add/permissions_json , where admins can upload specifically formatted JSON files , and I can upload to it all fine and dandy.

I’d like to validate the file uploaded and rename it, the problem is that I can’t find a way to hook into the form. Hooking into hook_form_media_permissions_json_add_form produces nothing. Even a trick such as

function hook_form_alter(&$form, &$form_state, $form_id) {

has no effect on my form. If I put a simple exit on my module’s page stops the website so the file is accessible. I just can’t figure out how to add validation to this add media form. Any ideas? Thank you.