Every field in Symfony now is an instance of a form object. To add custom errors in the controller upon form submission, you have to access the form object of the field then add the custom error to it.
$error = new formerror("Your field custom error message here."); $form->get('fieldName')->addError($error); //You will need to include the formerror class at the top of the file: use Symfony\Component\Form\FormError