Answer the question
In order to leave comments, you need to log in
CakePHP: beforeValidate is not called. For what reason?
There is a project. Everything worked. Asked to add a new field. Added in the form and in the database. I did not touch the controller and model code.
The fields are being filled. But I got a strange error.
in the beforeValidate method of the model I need, there is the generation of the slug attribute. and it stopped generating. by poke came to
public function beforeValidate($options = array()) {die('<pre>'.print_r(array(__FILE__, __LINE__, __METHOD__, __CLASS__),true));
Answer the question
In order to leave comments, you need to log in
Make sure you do save with validation. Otherwise, the beforeValidate method is simply not called.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question