Model errors Throw UserException


Maybe dumb question,

How can I throw ActiveRecords error after validate()?

I’m looking for a simple way to convert all of ActiveRecords errors to UserException.

Not sure what you want to do. something like this?

if (!$model->validate()) {

    throw new InvalidInputException($model->getErrors());



but there is no InvalidInputException