{"record":{"id":"3d228e0bc3694222","repo":"phalcon/cphalcon","slug":"validationmessage","errorCode":null,"errorMessage":"{validationMessage}","messagePattern":"\\{validationMessage\\}","errorType":"validation","errorClass":"Phalcon\\Mvc\\Model\\ValidationFailed","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model.zep","lineNumber":2945,"sourceCode":"        if this->preSave(metaData, exists, identityField) === false {\n            /**\n             * Rollback the current transaction if there was validation errors\n             */\n            if hasRelatedToSave {\n                writeConnection->rollback(false);\n            }\n\n            let this->syncRelated = [];\n\n            /**\n             * Throw exceptions on failed saves?\n             */\n            if unlikely Settings::get(\"orm.exception_on_failed_save\") {\n                /**\n                 * Launch a Phalcon\\Mvc\\Model\\ValidationFailed to notify that\n                 * the save failed\n                 */\n                throw new ValidationFailed(\n                    this,\n                    this->getMessages()\n                );\n            }\n\n            return false;\n        }\n\n        /**\n         * Capture the current snapshot before the write so it can be restored\n         * if postSaveRelatedRecords later rolls back the transaction\n         */\n        let manager = this->getModelsManager();\n\n        if manager->isKeepingSnapshots(this) && Settings::get(\"orm.update_snapshot_on_save\") {\n            let savedSnapshot    = this->snapshot,\n                savedOldSnapshot = this->oldSnapshot;\n        }","sourceCodeStart":2927,"sourceCodeEnd":2963,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model.zep#L2927-L2963","documentation":"Error \"{validationMessage}\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model.zep:2945 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}