public function isValid() { // This is a last line of defense against storing invalid data. // It can be used to check validity, as an alternative to doing so // in prepareSave(). // // Checking here has the advantage that this is ALWAYS called before // the content is saved to the database, no matter whether the content // was edited, imported, restored, or what. // // The downside is that it's too late here for meaningful interaction // with the user, we can just abort the save operation, casing an internal // error. return parent::isValid(); }