Class **Phalcon\\Mvc\\Model\\ValidationFailed** =============================================== *extends* class :doc:`Phalcon\\Mvc\\Model\\Exception ` *implements* `Throwable `_ .. role:: raw-html(raw) :format: html :raw-html:`Source on GitHub` This exception is generated when a model fails to save a record Phalcon\\Mvc\\Model must be set up to have this behavior Methods ------- public **__construct** (*Model* $model, *Message*\ [] $validationMessages) Phalcon\\Mvc\\Model\\ValidationFailed constructor public **getModel** () Returns the model that generated the messages public **getMessages** () Returns the complete group of messages produced in the validation final private `Exception `_ **__clone** () inherited from `Exception `_ Clone the exception public **__wakeup** () inherited from `Exception `_ ... final public *string* **getMessage** () inherited from `Exception `_ Gets the Exception message final public *int* **getCode** () inherited from `Exception `_ Gets the Exception code final public *string* **getFile** () inherited from `Exception `_ Gets the file in which the exception occurred final public *int* **getLine** () inherited from `Exception `_ Gets the line in which the exception occurred final public *array* **getTrace** () inherited from `Exception `_ Gets the stack trace final public `Exception `_ **getPrevious** () inherited from `Exception `_ Returns previous Exception final public `Exception `_ **getTraceAsString** () inherited from `Exception `_ Gets the stack trace as a string public *string* **__toString** () inherited from `Exception `_ String representation of the exception