protected function _before() { parent::_before(); $this->validation = new Validation(); $this->validation->add('name', new Validation\Validator\PresenceOf(['message' => 'Name cant be empty.'])); $this->validation->setFilters('name', 'trim'); }