Couldn't get setErrorByName to apply error class
Setting errors outside of validation isn't supported any more. From a related change record:


  In Drupal 7, form validation functions could use either form_set_error() or form_error() to set errors for an element, and form_get_errors() to retrieve the errors for a given form.
  These were global functions, which just set or retrieved errors from the current form being processed. This worked fine for form validation functions, but could produce unexpected results when called from non-form functions (like a theme function).
  
  In order to ensure that errors are associated with the correct form, you must now call the form error functions on $form_state.


Even if you got a reference to the form state in your controller, setting errors on it wouldn't do anything as the form wouldn't be validating (see this change record)

The best alternative is probably to use hook_form_alter and a validation method to the form which contains your logic.