I'm passing $errors to Twig, generated from this:
$insert = new MyEntity();
$insert->setTest1( 'testtesttest' );
$validator = $this->get('validator');
$errors = $validator->validate($insert);
...how do I get a specific error value, something like this if it worked?
{{ errors('field1') }}
...which should just return the error message, e.g. "That is not a valid email address" etc.
I know I can loop through to get all of them:
{% for err in errors %}
{{ err.label }}: {{ err.value }}<br />
{% endfor %}
...but I just want one specific one