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

Form Validation

Hi,

I wrote a custom validator for captcha that compare session value with submitted value, and custom captcha element that consist of textbox+image tag. everything is ok & validate() method in validator class return suitable boolean & works well.

But form shows validation message again even when validate() return true! whats my mistake? element don't pay attention to what validate() returns!



5.7k
Accepted
answer

I found my mistake! :) I set Message before return true or false in validate() method! oops!