Serialization should encompass the entire object, not just the error messages.

```php
public function serialize()
{
    return serialize(array($this->data, $this->rawMessages, $this->messageVariables));
}

public function unserialize($serialized)
{
    $unserialized           = unserialize($serialized);
    $this->data             = $unserialized[0];
    $this->rawMessages      = $unserialized[1];
    $this->messageVariables = $unserialized[2];
}

public function jsonSerialize()
{
    return array('valid' => $this->isValid(), 'messages' => $this->getErrorMessages());
}
```