Hi Until beforeValidate has been removed i kept logic like this in beforeValidate public function beforeValidate(Event $event, Entity $entity) { if( $entity->isNew() ) { $businessType = $entity->customer->businessType; if( $businessType == BusinessType::BUSINESS_TYPE_PERSON ) $entity->b2_type = B2Type::TYPE_B2C; elseif( $businessType == BusinessType::BUSINESS_TYPE_COMPANY ) $entity->b2_type = B2Type::TYPE_B2B; if( $entity->dirty('products') ) { $entity->premium_type = $entity->products[0]->premium_type; $entity->premium_value = $entity->products[0]->premium_value; }
I ve got a case where i just need to validate entity (i need deep named validations) and set errors (at entity level) - without saving. Since there is no $table->validate($entity) anymore, how can i achieve it? How should my controller look like ?. Do i have to completely rewrite all the logic now? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.