phalcon/cphalcon · error · Phalcon\Mvc\Model\ValidationFailed

{validationMessage}

Error message

{validationMessage}

What it means

Error "{validationMessage}" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model.zep:2945

        if this->preSave(metaData, exists, identityField) === false {
            /**
             * Rollback the current transaction if there was validation errors
             */
            if hasRelatedToSave {
                writeConnection->rollback(false);
            }

            let this->syncRelated = [];

            /**
             * Throw exceptions on failed saves?
             */
            if unlikely Settings::get("orm.exception_on_failed_save") {
                /**
                 * Launch a Phalcon\Mvc\Model\ValidationFailed to notify that
                 * the save failed
                 */
                throw new ValidationFailed(
                    this,
                    this->getMessages()
                );
            }

            return false;
        }

        /**
         * Capture the current snapshot before the write so it can be restored
         * if postSaveRelatedRecords later rolls back the transaction
         */
        let manager = this->getModelsManager();

        if manager->isKeepingSnapshots(this) && Settings::get("orm.update_snapshot_on_save") {
            let savedSnapshot    = this->snapshot,
                savedOldSnapshot = this->oldSnapshot;
        }

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model.zep:2945 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/3d228e0bc3694222. Report an issue: GitHub.