/** * {@inheritdoc} * * @return string */ public function beforeSave() { $this->addValidator('type', v::equals('image')); }