It's safer to use: `if (!$object->hasErrors($attribute)) {`