We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

question about the parameter of isValid ([array $data], [object $entity])

isValid ([array $data], [object $entity]) , What's the second parameter used for , and what should I do if I want change the valide condition ?

In what context are you finding that isValid function? Is it an object function? In a controller? Model? We need more info.

edited Nov '15

hello! i have questions too :)

for example, in controller

$form - is a form $data - request->getPost() $news - model

if (!$form->isValid($data, $news)) { foreach ($form->getMessages() as $message) { $this->flash->error($message); }