Validate form for presence of required fields

Make following fields compulsory: entity_type, entity and view mode.
If any error occurs, show the error in the dialog before proceeding further.

At the final step before submit happens, validate form to ensure all the required fields are present (from previous step as well as this step)

d.o issue: https://drupal.org/node/2279175
This is same as how the core does it: 
and it seems fine because the form id itself is being returned by this file only.

Another way to do this will to be to pass around the form id as a hidden field, but finding out the form id itself will be a bit hacky solution.