xxxxxxxxxx
return ['result' => 'error',
'message' => 'Errori apparecchio matricola ' . $model_apparecchio->matricola . ': ' . implode(' ;', $model_apparecchio->getFirstErrors())
]
//started with yii2 version 2.0.14 there is a getErrorSummary() function
which returns errors for all attributes as a one-dimensional array